Skip to content

Dates

Results depend on the current date, so these are shown rather than asserted by the documentation test suite.

Several orders are recognised, resolved by the active locale where ambiguous.

ExpressionMeaning
25/12/2023day, month, year
2023-12-25ISO order
2024-5-3ISO order, unpadded
25.12.2023dot separated

Write a literal as one run of characters, with no spaces around its separators. That is what tells a date from the arithmetic it is spelled identically to: 2024-5-3 is a date, and 2024 - 5 - 3 is 2016. Spacing decides it on its own, so a padded chain like 2024 - 05 - 03 is subtraction too.

ExpressionResult
25/12/2023 + 20 daysSunday, January 14, 2024
now + 3 hoursthree hours from now
today - 1 weekthis day last week
ExpressionResult
now, today, tomorrow, yesterdaythe obvious thing
next fridaythe coming Friday
last mondaythe previous Monday
ExpressionResult
days until 25/12/2026a duration in days
days since 01/01/2023a duration in days
weeks between 01/01/2024 and 01/06/2024a duration in weeks

Weekends are excluded. Public holidays are not, because that needs a region-specific and continuously updated calendar, and quietly guessing would be worse than not offering it.

ExpressionResult
25/12/2023 + 5 workdaysfive working days later
workdays in 3 weeksthe count of working days