Skip to content
/ enlist Public

API for enlistment dates and public holidays in Singapore

Notifications You must be signed in to change notification settings

ninest/enlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enlist

An API to get enlistment dates and public holidays

GitHub Workflow Status

🤔 Usage

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.

Example

{
  "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 for the Dates page.

👟 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 or cmpb.gov.sg.