package
Get the day of the week.
npm install dayofweekGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Get the day of the week given year, month, and day.
Port of dayofweek function given by Tomohiko Sakamoto on the comp.lang.c Usenet newsgroup into JavaScript.
See: https://groups.google.com/forum/#!msg/comp.lang.c/m4YG7Uw72Ic/WQj-pRNzJaIJ
How it works: https://www.quora.com/How-does-Tomohiko-Sakamotos-Algorithm-work
$ yarn add dayofweek
# npm v5+
$ npm install dayofweek
# before npm v5
$ npm install --save dayofweekconst dayofweek = require('dayofweek');
// API
// dayofweek(year, month, day[, translate = true])
// Invariants as per Tomohiko Sakamoto's original implementation.
// * year > 1752
// * 1 <= month <= 12
// * 1 <= day <= 31
// By default returns days of the week.
dayofweek(2017, 6, 16);
dayofweek(2017, 6, 16, true);
dayofweek(2017, 6, 16, 'long');
// → Friday
// Setting translate = 'short' will return shorthand form of the days of the week.
dayofweek(2017, 6,
Public Domain.