
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@jcoreio/dst
Advanced tools
Is it daylight savings time?
Designed for use in node as well as in-browser.
Returns true if the date is during daylight savings time.
Available either directly via require
or on the window object, is_dst
is the function underlying the prototype method.
It accepts an additional thresholds
argument, which should take the following
form:
{
"spring_forward":<integer offset from beginning of year in milliseconds>,
"fall_back":<integer offset from beginning of year in milliseconds>,
}
nota bene
spring_forward
need not be beforefall_back
-- in fact, in 50% of earthly hemispheres, it's just the opposite situation.further, in other saner lands, there may be no thresholds to cross -- that is, there are happy, productive human beings that somehow survive without DST. in that case, both fields may be set to
0
.
Splits the year in two halves, and attempts to check at which point in the hemi-year
Date#getTimezoneOffset
changes values. Run once during the execution of the program.
Uses a binary search -- cuts out at the granularity of one second.
May be used to provide valid thresholds
to pass into is_dst
, if so desired.
in node:
$ npm install --dev dst
$ npm test dst
in browser: open this url
or:
$ git clone git@github.com:chrisdickinson/dst.js.git
$ cd dst.js
$ python -m SimpleHTTPServer
$ open http://localhost:8000/test/
MIT
FAQs
determine if a date is in daylight savings time
We found that @jcoreio/dst demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.