JSPM

what-is-the-weekday

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q57289F
  • License MIT

Implementing zeller's congruence to discover what is the weekday given a date

Package Exports

  • what-is-the-weekday
  • what-is-the-weekday/whatIsTheWeekday.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (what-is-the-weekday) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

What is the weekday?

The idea with this package is to return to you the weekday from a JavaScript Date object.

Installation

This library is available as a npm package. You can install:

npm install what-is-the-weekday --save
# or using yarn
yarn add what-is-the-weekday

Usage

const whatIsTheWeekday = require('what-is-the-weekday');

const date = new Date('2018-01-01');

console.log(whatIsTheWeekday({ date }));
// => Monday

This package is also available in Brazilian Portuguese!

const whatIsTheWeekday = require('what-is-the-weekday');

console.log(whatIsTheWeekday({ date: new Date('2018-01-01'), lang: 'pt-br' }));
// => Segunda-Feira