0.0.1 • Published 5 years ago

spacetime-week v0.0.1

Weekly downloads
17
License
-
Repository
-
Last release
5 years ago

The start of a week varies officially in different countries.

This is a library to help understand week-starts/ends, by country or timezone.

It does some opinionated guesswork to determine the most appropriate week-start, when a timezone is given.

It returns a javascript-ordered day number (0=Sunday).

It is built for use in/with the spacetime library

npm i spacetime-week

const spacetimeWeek = require('spacetime-week')
const start = spacetimeWeek('canada')
// 0
spacetimeWeek('china')
// 0
spacetimeWeek('russia')
// 1

Some Info:

work-in-progress

MIT

0.0.1

5 years ago