Skip to main content

Module date_serial

Module date_serial 

Source
Expand description

Canonical Excel date-serial conversion.

Excel workbooks use either the 1900 or 1904 date system. The 1900 system also contains a fictitious 1900-02-29 at serial 60. Since chrono cannot represent that date (or Excel’s display-only 1900-01-00 at serial 0), calendar conversion and display conversion are intentionally separate.

Structs§

ExcelDateParts
Calendar fields rendered by Excel, including display-only dates that cannot be represented by chrono::NaiveDate.

Functions§

date_to_serial_for
Convert a date to an Excel serial in the selected date system.
datetime_to_serial
Compatibility wrapper for the historical, implicit Excel-1900 API.
datetime_to_serial_for
Convert a datetime to an Excel serial in the selected date system.
max_excel_serial_for
Return the final whole-day serial supported by Excel’s calendar.
parse_excel_date_text
Parse date text using Formualizer’s deterministic en-US spreadsheet convention.
parse_excel_datetime_text
Parse an en-US date and time separated by whitespace or an ISO T.
parse_excel_datetime_text_to_serial_for
Parse spreadsheet date, time, or datetime text and return its serial.
parse_excel_time_text
Parse time text using fixed 24-hour or English AM/PM formats.
serial_to_datetime
Compatibility wrapper for the historical, implicit Excel-1900 API.
time_to_fraction
Convert a time to its fractional-day representation.
try_serial_to_date_for
Convert an Excel serial to a representable chrono date.
try_serial_to_datetime_for
Convert an Excel serial to a representable chrono datetime.
try_serial_to_display_date_parts_for
Return the date fields Excel displays for a serial.
validate_excel_serial
Validate an Excel serial before converting it to a calendar value.