is-it-weekend

1.1.0 • Public • Published

is-it-weekend

Returns true if today is a weekend, otherwise it returns false.

This module supports weekends that are not on a Saturday or Sunday if a country code is provided.

Build status js-standard-style

Installation

npm install is-it-weekend --save

Usage

var weekend = require('is-it-weekend')
 
// will log `true` if it's Saturday or Sunday
console.log(weekend())

API

var bool = weekend([countryCode])

If no countryCode is given, bool will be true if it's a Saturday or a Sunday, otherwise false.

If a countryCode is given, the custom of that particular country will be followed.

Only ISO 3166-1 alpha-2 country codes are supported.

License

MIT

Package Sidebar

Install

npm i is-it-weekend

Weekly Downloads

44

Version

1.1.0

License

MIT

Last publish

Collaborators

  • watson