
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.
isomorphic-date
Advanced tools
When you only want to work with days and dates. Skipping the hassle of time and timezones.
###Examples:###
var holidays = require('isomorphic-date').holidays.se_sv
var i18n = require('isomorphic-date').i18n.sv
// Create date object with provided translation files and i18n data
var SimpleDate = require('isomorphic-date').createSimpleDate(holidays, i18n)
// Create a date by passing a js date obj
var today = new SimpleDate(new Date())
today.daysFromToday() == 0
today.daysFromTodayAsText() == "Idag" // "Today" in swedish as per i18n data
// Create a date by passing a string
var date = new SimpleDate("2016-01-01")
date.toString() == "2016-01-01"
date.year == 2016
date.month == 1
date.day == 1
date.isoWeekNr() == 1
date.isHoliday() == "Nyårsdagen" // Returns false || true (Sundays) || string (if it is a holiday according to the passed holiday data)
date.deltaDays(1)
// Create a date by passing params
var date = new SimpleDate(2016, 1, 5)
date.toString() == "2016-01-05"
// Create a date by passing another SimpleDate obj
var date2 = new SimpleDate(date)
date2.toString() == "2016-01-05"
// Compare simple dates
date2.eq(date) // true
date.lt(today) // true
date.gt(today) // false
To internationalise you can copy and edit lib/holidays/se_sv.js and lib/i18n/sv.js. Pass your customised objects to the SimpleDate factory:
var holidays = require('./custom_holidays.js')
var i18n = require('./custom_i18n.js')
var SimpleDate = require('isomorphic-date')(holidays, i18n)
To run the tests do an npm install and then npm run test.
FAQs
Just dates, no time, no dependencies
The npm package isomorphic-date receives a total of 2 weekly downloads. As such, isomorphic-date popularity was classified as not popular.
We found that isomorphic-date 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.