Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pret-a-porter/month-list
Get month list in your locale
https://github.com/pret-a-porter/month-list
Last synced: 22 days ago
JSON representation
Get month list in your locale
- Host: GitHub
- URL: https://github.com/pret-a-porter/month-list
- Owner: pret-a-porter
- Created: 2020-06-05T08:02:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-26T12:26:11.000Z (over 1 year ago)
- Last Synced: 2024-10-07T10:53:42.158Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 1000 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/month-list.svg)](https://badge.fury.io/js/month-list)
# month-list
Module exports two functions `getMonthList` and `getWeekDays`
Function returns month list in your locale;
## How to install
```sh
npm install month-list --save
```or
```sh
yarn add month-list
```## Examples
🇬🇧 `getMonthList('en')` will return:
```js
January
February
March
April
May
June
July
August
September
October
November
December
```🇬🇧 `getMonthList('en', 'short')` will return:
```js
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
```🇬🇧 `getWeekDays('en')` will return:
```js
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
```🇬🇧 `getWeekDays('en', 'long', true)` will return:
```js
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
```🇬🇧 `getWeekDays('en', 'short')` will return:
```js
Mon
Tue
Wed
Thu
Fri
Sat
Sun
```🇬🇧 `getWeekDays('en', 'narrow')` will return:
```js
M
T
W
T
F
S
S
```