An API to get enlistment dates and public holidays
The endpoint ns-enlist.vercel.app/api returns the current year and a list of events (Public holidays or BMT enlistments) that are not yet over.
{
"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"
},
...
]
}
If you do not want to rely on the API, you can download 2020-dates.json
. It is used in ninest/NSR for the Dates page.
To generate the year-dates.json
yourself, download the repository and run create.py
.
MIT
All data about public holidays and enlistment dates are from mom.gov.sg or cmpb.gov.sg.