Socket
Book a DemoInstallSign in
Socket

is-it-weekend

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-it-weekend

Returns true if it's Saturday or Sunday, otherwise it returns false

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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

Keywords

date

FAQs

Package last updated on 15 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts