(self, row: int, col: int, date, cell_format=None)
| 1182 | |
| 1183 | # Undecorated version of write_datetime(). |
| 1184 | def _write_datetime(self, row: int, col: int, date, cell_format=None) -> int: |
| 1185 | # Check that row and col are valid and store max and min values. |
| 1186 | if self._check_dimensions(row, col): |
| 1187 | return -1 |
| 1188 | |
| 1189 | # Write previous row if in in-line string constant_memory mode. |
| 1190 | if self.constant_memory and row > self.previous_row: |
| 1191 | self._write_single_row(row) |
| 1192 | |
| 1193 | # Convert datetime to an Excel date. |
| 1194 | number = self._convert_date_time(date) |
| 1195 | |
| 1196 | # Add the default date format. |
| 1197 | if cell_format is None: |
| 1198 | cell_format = self.default_date_format |
| 1199 | |
| 1200 | # Store the cell data in the worksheet data table. |
| 1201 | self.table[row][col] = CellDatetimeTuple(number, cell_format) |
| 1202 | |
| 1203 | return 0 |
| 1204 | |
| 1205 | @convert_cell_args |
| 1206 | def write_boolean( |
no test coverage detected