🇵🇸 Free Palestine! 🇵🇸

modified human rights logo, lenorian calendar logo

Lenorian calendar

API Documentation

Base URL: /api

For now the API is open to every requests, possible breaking changes in the future: either whitelisting or API tokens

GET /convert

Convert the current Gregorian date to the corresponding Lenorian date using the UTC timezone

Response

{
  "status": 200,
  "message": "OK",
  "ok": true,
  "body": {
    "timezone": "utc",
    "year": {
      "value": 0,
      "leapYear": true,
      "totalDays": 366
    },
    "month": {
      "index": 8,
      "name": "November",
      "value": 9
    },
    "monthDay": {
      "index": 21,
      "value": 22
    },
    "weekday": {
      "index": 1,
      "name": "Veneday"
    },
    "shortDate": "0000-09-22",
    "fullDate": "Veneday, 22 November 0",
    "holiday": "Universal Declaration of Human Rights Day",
    "yearDay": 265
  }
}

Optional query parameters

Field Type Format Description
gdate Date YYYY-MM-DD Convert a Gregorian date to a Lenorian date; always uses UTC
time Integer Unix time Convert an Unix timestamp (in seconds) to a Lenorian date
offset Integer Switch to local time by specifying the timezone offset (in minutes) from UTC

Response body fields details

Field Type Range Value Format
timezone String utc / local
year.value Integer [ -∞ ; ∞ ]
year.leapYear Boolean
year.totalDays Integer 365 or 366
month.index Integer [ 0 ; 11 ]
month.value Integer [ 1 ; 12 ]
month.name String
monthDay.index Integer [ 0 ; 30 ]
monthDay.value Integer [ 1 ; 31 ]
weekDay.index Integer [ 0 ; 7 ]
weekDay.name String
shortDate String YYYY-MM-DD
fullDate String weekday day month year
holiday String
yearDay Integer [ 0 ; 365 ]

GET /calendar

Generate the Lenorian calendar for the current Lenorian year

Response

{
  "status": 200,
  "message": "OK",
  "ok": true,
  "body": {
    "year": {
      "value": 0,
      "leapYear": true,
      "totalDays": 366
    },
    "months": [
      // ...
      {
        "month": {
          "index": 8,
          "name": "November",
          "value": 9,
          "current": true
        },
        "monthDays": [
          // ...
          {
            "day": {
              "index": 21,
              "value": 22,
              "current": true,
              "holiday": "Universal Declaration of Human Rights Day"
            },
            "weekday": {
              "index": 1,
              "name": "Veneday"
            }
          },
          // ...
        ]
      },
      // ...
    ]
  }
}

Optional query parameter

Field Type Format Description
year Integer Generate the Lenorian calendar for the specified Lenorian year

Response body fields details

Field Type Range / Value Description
year.value Integer [ -∞ ; ∞ ]
year.leapYear Boolean
year.totalDays Integer 365 or 366
months Array months.length equals 12
  month.index Integer [ 0 ; 11 ]
  month.value Integer [ 1 ; 12 ]
  month.name String
  month.current Boolean Highlight the current month when applicable (UTC)
  monthDays Array monthDays.length equals 30 or 31
    day.index Integer [ 0 ; 30 ]
    day.value Integer [ 1 ; 31 ]
    day.current Boolean Highlight the current day when applicable (UTC)
    day.holiday String
    weekday.index Integer [ 0 ; 7 ]
    weekday.name String