Returns the day of the month (1--31) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The day of the month (1--31).
Returns the day of the week (0--6, where 0 is Sunday) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The day of the week (0 = Sunday, 6 = Saturday).
Returns the full year (4 digits) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The four-digit year.
Returns the hour (0--23) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The hour (0--23).
Returns the milliseconds (0--999) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The milliseconds component (0--999).
Returns the minutes (0--59) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The minutes component (0--59).
Returns the month (0--11, where 0 is January) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The month (0 = January, 11 = December).
Returns the seconds (0--59) for the specified date according to local time.
A date value (ISO string, milliseconds, or Date).
The seconds component (0--59).
Returns the number of milliseconds since January 1, 1970, 00:00:00 UTC for the specified date.
A date value (ISO string, milliseconds, or Date).
Milliseconds since the Unix epoch.
Returns the time zone difference, in minutes, from the current locale (host system settings) to UTC.
A date value (ISO string, milliseconds, or Date).
The timezone offset in minutes.
Returns the day of the month (1--31) for the specified date according to universal time (UTC).
A date value (ISO string, milliseconds, or Date).
The UTC day of the month (1--31).
Returns the day of the week (0--6, where 0 is Sunday) for the specified date according to universal time (UTC).
A date value (ISO string, milliseconds, or Date).
The UTC day of the week (0 = Sunday, 6 = Saturday).
Returns the year of the specified date according to universal time (UTC).
A date value (ISO string, milliseconds, or Date).
The four-digit UTC year.
Returns the hours (0--23) of the specified date according to universal time (UTC).
A date value (ISO string, milliseconds, or Date).
The UTC hours (0--23).
Returns the milliseconds (0--999) of the specified date according to universal time (UTC).
A date value (ISO string, milliseconds, or Date).
The UTC milliseconds (0--999).
Returns the minutes (0--59) of the specified date according to universal time (UTC).
A date value (ISO string, milliseconds, or Date).
The UTC minutes (0--59).
Returns the month (0--11) of the specified date according to universal time (UTC), where 0 is January and 11 is December.
A date value (ISO string, milliseconds, or Date).
The UTC month (0 = January, 11 = December).
Returns the seconds (0--59) of the specified date according to universal time (UTC).
A date value (ISO string, milliseconds, or Date).
The UTC seconds (0--59).
Parses a string representation of a date and returns the number of milliseconds since the Unix epoch (January 1, 1970 00:00:00 UTC).
A date string to parse (e.g., "April 23, 2023 12:00:00").
Milliseconds since the Unix epoch for the given date string.
Sets the day of the month (1--31) of a date object according to local time. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The day of the month to set (1--31).
The updated timestamp in milliseconds since epoch.
Sets the full year of a date object according to local time, with optional month and day parameters. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The full year value to set.
Optionalmonth: numberOptional month to set (0--11).
Optionalday: numberOptional day of the month to set (1--31).
The updated timestamp in milliseconds since epoch.
Sets the hours (0--23) of a date object according to local time, with optional minutes, seconds, and milliseconds. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The hours value to set (0--23).
Optionalminutes: numberOptional minutes to set (0--59).
Optionalseconds: numberOptional seconds to set (0--59).
Optionalms: numberOptional milliseconds to set (0--999).
The updated timestamp in milliseconds since epoch.
Sets the milliseconds value (0--999) of a date object according to local time and returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The milliseconds value to set (0--999).
The updated timestamp in milliseconds since epoch.
Sets the minutes value (0--59) of a date object according to local time, with optional seconds and milliseconds. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The minutes value to set (0--59).
Optionalseconds: numberOptional seconds value to set (0--59).
Optionalms: numberOptional milliseconds value to set (0--999).
The updated timestamp in milliseconds since epoch.
Sets the month value (0--11) of a date object according to local time, with an optional day of the month. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The month value to set (0 = January, 11 = December).
Optionalday: numberOptional day of the month to set (1--31).
The updated timestamp in milliseconds since epoch.
Sets the seconds value (0--59) of a date object according to local time, with optional milliseconds. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The seconds value to set (0--59).
Optionalms: numberOptional milliseconds value to set (0--999).
The updated timestamp in milliseconds since epoch.
Sets the date object to the time represented by the number of milliseconds since January 1, 1970, 00:00:00 UTC. Returns the new timestamp.
A date value (ISO string, milliseconds, or Date).
The number of milliseconds since the Unix epoch.
The updated timestamp in milliseconds since epoch.
Sets the day of the month (1--31) of a date object according to universal time (UTC). Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The UTC day of the month to set (1--31).
The updated timestamp in milliseconds since epoch.
Sets the full year of a date object according to universal time (UTC), with optional month and day parameters. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The UTC full year value to set.
Optionalmonth: numberOptional UTC month to set (0--11).
Optionalday: numberOptional UTC day of the month to set (1--31).
The updated timestamp in milliseconds since epoch.
Sets the hours (0--23) of a date object according to universal time (UTC), with optional minutes, seconds, and milliseconds. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The UTC hours value to set (0--23).
Optionalminutes: numberOptional UTC minutes to set (0--59).
Optionalseconds: numberOptional UTC seconds to set (0--59).
Optionalms: numberOptional UTC milliseconds to set (0--999).
The updated timestamp in milliseconds since epoch.
Sets the milliseconds value (0--999) of a date object according to universal time (UTC). Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The UTC milliseconds value to set (0--999).
The updated timestamp in milliseconds since epoch.
Sets the minutes value (0--59) of a date object according to universal time (UTC), with optional seconds and milliseconds. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The UTC minutes value to set (0--59).
Optionalseconds: numberOptional UTC seconds to set (0--59).
Optionalms: numberOptional UTC milliseconds to set (0--999).
The updated timestamp in milliseconds since epoch.
Sets the month value (0--11) of a date object according to universal time (UTC), with an optional day parameter. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The UTC month value to set (0 = January, 11 = December).
Optionalday: numberOptional UTC day of the month to set (1--31).
The updated timestamp in milliseconds since epoch.
Sets the seconds value (0--59) of a date object according to universal time (UTC), with an optional milliseconds parameter. Returns the new timestamp in milliseconds.
A date value (ISO string, milliseconds, or Date).
The UTC seconds value to set (0--59).
Optionalms: numberOptional UTC milliseconds to set (0--999).
The updated timestamp in milliseconds since epoch.
Returns the date portion of a date object in a human-readable form as a
string (e.g., "Sun Apr 23 2023").
A date value (ISO string, milliseconds, or Date).
The date portion as a human-readable string.
Returns the date object as a string in ISO 8601 format
(e.g., "2023-04-23T12:34:56.000Z").
A date value (ISO string, milliseconds, or Date).
The date as an ISO 8601 string.
Returns an ISO date (or current date if none provided) as a string
formatted as a compact decimal (e.g., "20240423123456.789"). This is
useful for sorting dates in string format while keeping the output more
human-friendly than date.valueOf. Uses the formatISODate utility
internally.
Optionaldate: DateInputOptional date value (ISO string, milliseconds, or Date). Defaults to now.
The date formatted as a compact decimal string.
Returns the date object as a string in a JSON-compatible format, which is similar to the ISO 8601 format.
A date value (ISO string, milliseconds, or Date).
The date as a JSON-compatible string.
Returns the date object as a string formatted according to the given locale(s) and formatting options, showing only the date portion.
A date value (ISO string, milliseconds, or Date).
Optionallocales: string | string[]Optional locale string or array of locale strings (e.g., "en-US").
Optionaloptions: DateTimeFormatOptionsOptional formatting options.
The localized date string.
Returns the date object as a string formatted according to the given locale(s) and formatting options, including both date and time portions.
A date value (ISO string, milliseconds, or Date).
Optionallocales: string | string[]Optional locale string or array of locale strings (e.g., "en-US").
Optionaloptions: DateTimeFormatOptionsOptional formatting options.
The localized date and time string.
Returns the time portion of a date object as a string formatted according to the given locale(s) and formatting options.
A date value (ISO string, milliseconds, or Date).
Optionallocales: string | string[]Optional locale string or array of locale strings (e.g., "en-US").
Optionaloptions: DateTimeFormatOptionsOptional formatting options.
The localized time string.
Converts a date object to a string using the default formatting for the local time zone.
A date value (ISO string, milliseconds, or Date).
The date and time as a string in the local time zone.
Returns the number of milliseconds since January 1, 1970, 00:00:00 UTC for the given date components. Accepts between two and seven parameters.
The full year (e.g., 2023).
The month (0 = January, 11 = December).
Optionaldate: numberOptional day of the month (1--31).
Optionalhours: numberOptional hours (0--23).
Optionalminutes: numberOptional minutes (0--59).
Optionalseconds: numberOptional seconds (0--59).
Optionalms: numberOptional milliseconds (0--999).
Milliseconds since the Unix epoch for the given UTC date components.
Returns the numeric value of the specified date object as the number of milliseconds since January 1, 1970, 00:00:00 UTC.
A date value (ISO string, milliseconds, or Date).
Milliseconds since the Unix epoch.
StaticgetConverts a date input (ISO string, milliseconds, or Date instance) into a native Date object. This static helper centralises the parsing logic used by every other DateHandler method, allowing concise mapping rules that avoid date-initialisation boilerplate.
A date value as an ISO 8601 string, numeric milliseconds since epoch, or an existing Date instance.
A native Date object corresponding to the input.
Provides date manipulation and formatting functions for use in HotMesh mapping rules. Although inspired by JavaScript's Date API, these methods follow a functional approach where each transformation expects one or more input parameters from the prior row in the
@pipestructure.Many methods accept various input formats (
Date,string, andnumber), implicitly casting to dates as necessary. The ISO 8601 Extended Format is supported, including date strings likeYYYY-MM-DD,YYYY-MM-DDTHH:mm:ss, andYYYY-MM-DDTHH:mm:ss.sssZ. Strings or numbers representing milliseconds since the Unix epoch are also accepted.Remarks
Methods are invoked as
{@date.<method>}, e.g.,{@date.now}or{@date.getFullYear}.