A day of the month: 1-31 depending on the month
Hour of the day in 24 time: 0-23
Millisecond of the second: 0-999
Minute of the hour: 0-59
A month of the year: 1-12
The full, four digit year.
import {toUtcIsoString} from 'date-vir';
const exampleDate: FullDate = {
year: 2024,
month: 1,
day: 5,
hour: 1,
minute: 1,
second: 1,
millisecond: 1,
timezone: 'UTC',
};
toUtcIsoString(exampleDate); // `'2024-01-05T01:01:01.001Z'`
toHttpDateString for the RFC 1123 / HTTP-date format.
Convert a FullDate into a UTC ISO 8601 string, always ending in Z (for example
'2024-01-05T01:01:01.001Z'). This is the machine-readable counterpart to toHttpDateString, which produces the human/HTTP-readable RFC 1123 format ('Fri, 05 Jan 2024 01:01:01 GMT'). Both represent the same instant in UTC; pick the one whose format your consumer expects.