
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
is-consecutive-day
Advanced tools
Returns whether one day has passed between two dates by only checking the year, month and day.
This package exports only one function: isConsecutiveDay(firstDate: Date, secondDate: Date): boolean
,
it checks if secondDate
is one day after firstDate
on the calendar, the difference between this and checking if
24 hours have passed between the two dates is that if you have two dates: Nov 13 2:00PM and Nov 14 5:00PM, and you want to know whether they're consecutive
by checking if less than 24 hours have passed, even though Nov 14 is one day after Nov 13 on the calendar, you would get that they're
not consecutive if you used the 24 hours method because obviously more than 24 hours have passed.
So if your goal is to check if one day has passed on the calendar, without considering hours, minutes, seconds, milliseconds, etc, this is the package.
import isConsecutiveDay from "is-consecutive-day";
// This returns true
isConsecutiveDay(
new Date("Fri Nov 30 2022 14:35:46 GMT-0800 (Pacific Standard Time)"),
new Date("Fri Dec 01 2022 17:33:42 GMT-0800 (Pacific Standard Time)")
)
// This returns false
isConsecutiveDay(
new Date("Fri Nov 30 2022 14:35:46 GMT-0800 (Pacific Standard Time)"),
new Date("Fri Dec 02 2022 17:33:42 GMT-0800 (Pacific Standard Time)")
)
FAQs
Returns whether one day has passed between two dates by only checking the year, month and day.
The npm package is-consecutive-day receives a total of 0 weekly downloads. As such, is-consecutive-day popularity was classified as not popular.
We found that is-consecutive-day 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.