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 = const start = // 0// 0// 1
Some Info:
work-in-progress
MIT