n3a9 / mlh-events

The unofficial API for MLH events.
https://mlh-events.now.sh
13 stars 4 forks source link

Add year to date #14

Closed dawsbot closed 7 years ago

dawsbot commented 7 years ago

Date currently does not contain year. It's a challenge to determine which dates have already occurred without the year.

The best way to implement this might be to take s2016 and earlier as anomalies and have an object for them which provides the date. Something like this:

const knownYears = {
  s2016: 2016,
  f2016: 2016,
  s2015: 2015,
...
}

Then for na-2017 we can have a known dictionary of "<current year> - 1 months". Meaning that August - December in na-2017 are actually 2016 and then January onward are 2017.

Something like that. Let's go back and forth on ideas here before spending big time actually coding it to ensure there's a design we agree on.

dawsbot commented 7 years ago

Just noticed it already has the date in our api. I was assuming it didn't strictly from looking at MLH's page. Woops!