spacetime-week

0.0.1 • Public • Published

spacetime-week

calculate the start of a week
By Martin Spodniak and Spencer Kelly

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

Readme

Keywords

none

Package Sidebar

Install

npm i spacetime-week

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

7.23 kB

Total Files

9

Last publish

Collaborators

  • spencermountain
  • martin-spd