
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A 'BetterDate' is essentially a 'Date' that is easier and more intuitive to use than the built-in 'Date' class.
BetterDate is a JavaScript class just like the built-in Date, except:
add* functions, instead of being absolute requiring both a set* and get* to be called to modify by a delta.Math.floor the result for whole weeks or Math.ceil the result for ordinal/partial weeks).let betterDate = new BetterDate();
The '1' is one-indexed to intuitively mean 'January', not zero-indexed to mean 'February'.
betterDate = new BetterDate( 2017, 1, 26 );
new Date( betterDate );
// Thu Jan 26 2017 00:00:00 GMT-0600 (Central Standard Time)
Remove 10 hours from a 'BetterDate':
let epoch_ms = betterDate.addHours( -10 );
// 1485374400000
betterDate.toString();
// Wed Jan 25 2017 14:00:00 GMT-0600 (Central Standard Time)
Change the time zone offset (and name) without affecting the represented time.
betterDate.setTimezoneOffset( 480 );
betterDate.setTimezoneName( 'America/Los_Angeles' );
betterDate.toString();
// Wed Jan 25 2017 12:00:00 GMT-0800 (America/Los_Angeles)
new Date( betterDate );
// Wed Jan 25 2017 14:00:00 GMT-0600 (Central Standard Time)
Get week of year.
Math.ceil( betterDate.getWeeksOfYear());
// 4
FAQs
A 'BetterDate' is essentially a 'Date' that is easier and more intuitive to use than the built-in 'Date' class.
We found that betterdate 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.