iiumschedule / albiruni

Scrap and process data from IIUM subject database website.
https://pub.dev/packages/albiruni
MIT License
2 stars 1 forks source link

Built more intelligent day parser #8

Open iqfareez opened 1 year ago

iqfareez commented 1 year ago

See issue https://github.com/iqfareez/albiruni/issues/1, where I keep fixing the rare day format but it keeps happening.

The code also contains a lot of if's statement, which I don't really like. So, whenever I found there is another rare day format, I need to add to the parser.

https://github.com/iqfareez/albiruni/blob/244bece5079ff9c12864a95cad31accd2911dbc9/lib/src/util/date_time_util.dart#L36-L63

So, I'm thinking to write a better algorithm to check for the day, without the need to add a new one if found a new one.