small date utilities
adds a specified number of days to a date.
adds a specified number of hours to a date.
adds a specified number of milliseconds to a date.
adds a specified number of minutes to a date.
adds a specified number of months to a date.
adds a specified number of seconds to a date.
adds a specified number of years to a date.
clamps a date between a minimum and maximum range.
creates a copy of a given date.
compares two dates and returns a number indicating their relative order, in local time.
compares two dates and returns a number indicating their relative order, in UTC time.
represents a day of the week as a numeric value (0 = Sunday, 6 = Saturday).
calculates the difference in calendar days between two dates.
calculates the difference in calendar months between two dates.
calculates the difference in calendar weeks between two dates.
calculates the difference in calendar years between two dates.
calculates the difference in days between two dates.
calculates the difference in hours between two dates.
calculates the difference in milliseconds between two dates.
calculates the difference in minutes between two dates.
calculates the difference in months between two dates.
calculates the difference in seconds between two dates.
calculates the difference in weeks between two dates.
calculates the difference in years between two dates.
returns the end of the day for a given date.
returns the end of the month for a given date.
returns the end of the week for a given date.
returns the end of the year for a given date.
returns the day of the month for a given date.
returns the day of the week for a given date (0 = Sunday, 6 = Saturday).
returns the hours portion of a given date.
returns the milliseconds portion of a given date.
returns the minutes portion of a given date.
returns the month portion of a given date (0 = January, 11 = December).
returns the seconds portion of a given date.
returns the year portion of a given date.
checks if a date is after another date.
checks if a date is before another date.
checks if two dates fall on the same calendar day.
checks if two dates fall in the same calendar month.
checks if two dates fall in the same calendar year.
checks if two dates are exactly the same.
returns the later of two dates.
returns the earlier of two dates.
returns the next occurrence of a specific day of the week.
returns the previous occurrence of a specific day of the week.
returns the start of the day for a given date.
returns the start of the month for a given date.
returns the start of the week for a given date.
returns the start of the year for a given date.
converts a date to an ISO 8601 date string (YYYY-MM-DD) in local timezone
converts a date to an ISO 8601 datetime string (YYYY-MM-DDTHH:mm:ss.sss) in local timezone
returns the Unix timestamp in milliseconds for a given date.
returns the Unix timestamp in seconds for a given date