Sys.Date
Sys.Date formats dates in the language of the current End user and gives access to the bundled date-fns library for date arithmetic and parsing.
Availability: Everywhere
Functions
Section titled “Functions”format()
Section titled “format()”format(date: Date | number, format: string): stringFormats a date with a date-fns format pattern, using the date locale of the current language. If no date locale is loaded for the current language, Lowgile uses the default language’s locale, then en-US. Month and weekday names, and localized patterns such as P or PPPP, follow that locale.
| Parameter | Type | Description |
|---|---|---|
date | Date | number | Date to format, or a timestamp in milliseconds since 1 January 1970 UTC. |
format | string | Pattern in the date-fns syntax, for example 'dd.MM.yyyy HH:mm' or 'PPP'. See the date-fns format documentation for all tokens. |
Sys.Date.format(order.createdAt, 'dd.MM.yyyy') // e.g. "28.10.2026"Sys.Date.format(Date.now(), 'EEEE, PPP') // e.g. "Wednesday, October 28th, 2026"Returns: string · Availability: Everywhere
Note
null and undefined are accepted at runtime and give an empty string, although the type check rejects them.
Properties
Section titled “Properties”readonly fns: typeof fnsThe date-fns library (version ^2.30.0), as-is. It adds, subtracts, compares, parses and formats dates. Its functions use the en-US locale unless you pass a locale option; for formatting in the End user’s language, use format() instead.
Upstream documentation: date-fns v2.30.0
const dueDate = Sys.Date.fns.addDays(new Date(), 30)Type: typeof fns · Availability: Everywhere