https://github.com/ninest/enlist
API for enlistment dates and public holidays in Singapore
https://github.com/ninest/enlist
enlistment-dates holidays national-service singapore
Last synced: over 1 year ago
JSON representation
API for enlistment dates and public holidays in Singapore
- Host: GitHub
- URL: https://github.com/ninest/enlist
- Owner: ninest
- Created: 2020-07-31T17:53:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T07:46:26.000Z (over 3 years ago)
- Last Synced: 2025-01-07T14:24:10.026Z (over 1 year ago)
- Topics: enlistment-dates, holidays, national-service, singapore
- Language: Python
- Homepage: http://nsr.now.sh/dates
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Enlist
> An API to get enlistment dates and public holidays

## 🤔 Usage
The endpoint [ns-enlist.vercel.app/api](https://ns-enlist.vercel.app/api) returns the current year and a list of events (Public holidays or BMT enlistments) that are not yet over.
#### Example
```json
{
"year":2020,
"events_list":[
{
"title":"National Day",
"start":1596931200000,
"category":"Public Holiday"
},
{
"title":"National Day observed",
"start":1597017600000,
"category":"Public Holiday"
},
{
"title":"Deepavali",
"start":1605312000000,
"category":"Public Holiday"
},
{
"title":"Christmas Day",
"start":1608854400000,
"category":"Public Holiday"
},
...
]
}
```
## 📁 JSON file
If you do not want to rely on the API, you can download `2020-dates.json`. It is used in [ninest/NSR](https://github.com/ninest/nsr) for the [Dates page](https://nsr.now.sh/dates).
## 👟 Running
To generate the `year-dates.json` yourself, download the repository and run `create.py`.
## 📜 Licence
MIT
All data about public holidays and enlistment dates are from [mom.gov.sg](https://www.mom.gov.sg/employment-practices/public-holidays) or [cmpb.gov.sg](https://www.cmpb.gov.sg/web/portal/cmpb/home/before-ns/enlistment-dates).