Date Helpers
Utility functions for working with dates.
Functions
| Function | Description |
|---|---|
compare | Comparison of two dates. |
daysDifference | Gets the difference in days between two dates |
toISO8601 | Converts a date to ISO 8601 format |
toRFC3339 | Converts a date to RFC 3339 format |
toRFC2822 | Converts a date to RFC 2822 format |
isSameDay | Checks if two dates are the same day |
safeDate | Safely creates a Date object from various input types |
dateToISOString | Formats a date to ISO string or returns null |
isTimestampInSeconds | Checks if a timestamp is likely in seconds (Java/Unix style) vs milliseconds (JavaScript style) |
normalizeTimestamp | Converts a timestamp to JavaScript milliseconds format |