This release is 8 versions behind 0.225.6 — the latest version of @std/datetime. Jump to latest
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
UNSTABLE: Utilities for dealing with Date objects
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
a year ago (0.224.4)
v
DAY
The number of milliseconds in a day.
f
dayOfYear
Returns the number of the day in the year in the local time zone.
f
dayOfYearUtc
Returns the number of the day in the year in UTC time.
f
difference
Calculates the difference of the 2 given dates in various units. If the units are omitted, it returns the difference in the all available units.
T
DifferenceFormat
Return type for difference.
T
f
format
Formats a date to a string with the specified format.
I
v
HOUR
The number of milliseconds in an hour.
f
f
isUtcLeap
Returns whether the given year is a leap year in UTC time. This always returns the same value regardless of the local timezone.
v
MINUTE
The number of milliseconds in a minute.
f
parse
Parses a date string using the specified format string.
v