srehwald / eat-api

Simple static API for some (student) food places in Munich.
https://srehwald.github.io/eat-api/
MIT License
14 stars 20 forks source link

incorrect menu for fmi-bistro #44

Closed moredatapls closed 5 years ago

moredatapls commented 5 years ago

I've noticed that the API returns the wrong dishes for fmi-bistro. The PDFs published here show the current menu.

For instance today (it's Friday 11.01.2019) the API returns:

Minestrone | 1.00€ Grieß-Kokosmilch mit warmen Himbeeren | 3.20€ Schwäbischer Ofenschlüfer | 3.20€ Fischfilet in Kartoffelpanade dazu Kartoffel-Fenchelgemüse | 4.60€

But the actual menu is as follows:

Menu Friday 11.01.2019

moredatapls commented 5 years ago

The API is in fact delayed by one week, for this week it returns the menu that's shown in the screenshot:

Kokos-Karottensuppe mit Erdnüsse | 3.60€ Nüsse Heidelbeer- Kaiserschmarrn mit Apfelmus | 3.20€ Seelachsfilet “Provencial” mit Dampfkartoffeln | 4.60€

EDIT: I've found the culprit. strptime's %W argument starts with the first monday of each year. But in 2019, the 7th of January was the first Monday and therefore the calculation is off by a week. This therefore affects all the bistros and mensas that require a week number (e.g. the ipp-bistro).

I will attempt to fix it by offsetting the week numbers by one for 2019