Skip to main content

Module datetime

Module datetime 

Source
Expand description

Date and time fields (a:fld type="datetime…"): the text each field type shows for a moment, and the local clock.

The field types and their formats follow ECMA-376 Part 1, §21.1.2.2.4 (fld): datetime1 to datetime13, written as in PowerPoint’s English (United States) Date and Time list. datetime and datetimeFigureOut show the language’s short date. Numeric dates follow the run’s language; formats with month or day names, or AM/PM, are only computed for English, so other languages keep the text the file was saved with.

Structs§

DateTime
A local date and time: what the clock read, or a fixed moment (tests, deterministic output).

Functions§

field_text
The text date/time field kind shows at now in a run of language lang (BCP 47, e.g. en-US). None when kind isn’t a date/time type this knows, now isn’t a real date, or the format needs names in a language other than English: the field keeps its saved text.
is_date_field
Is field kind a date/time field?