Socket
Book a DemoInstallSign in
Socket

month

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

month

Get the name or number of the current month or any month of the year.

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
117
-36.07%
Maintainers
1
Weekly downloads
 
Created
Source

month NPM version

Get the name or number of the current month or any month of the year.

Install with npm

$ npm i month --save

Usage

var month = require('month');

month();
//=> 'January' (current month full name)

month('M');
//=> '1' (current month number)

month('MM');
//=> '01' (current month number, zero-filled)

month('MMM');
//=> 'Jan' (current month abbreviation)

month('MMMM');
//=> 'January' (current month full name)

month('January');
//=> '12' (number of the given month number)

month(1);
//=> 'January' (name of the given month number)

month(2);
//=> 'February'
  • days: Days of the week.
  • iso-week: Get the ISO week of the year.
  • months: Months of the year.
  • o-clock: Simple utility for displaying the time in 12-hour clock format.
  • seconds: Get the number of seconds for a minute, hour, day and week.
  • weekday: Get the name and number of the current weekday. Or get the name of the… more
  • week: Get the current week number.
  • year: Simple utility to get the current year with 2 or 4 digits.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on May 25, 2015.

Keywords

calendar

FAQs

Package last updated on 26 May 2015

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