Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.4 KB

README.md

File metadata and controls

52 lines (41 loc) · 1.4 KB

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.