OpeningHoursParser icon indicating copy to clipboard operation
OpeningHoursParser copied to clipboard

Suggestions for more lenient parsing

Open westnordost opened this issue 2 years ago • 0 comments

Rather than creating a new ticket for each of these, a list. Feel free to cross any out that you do not find meaningful to implement

  • [ ] accept A.M / P.M (missing dot at the end)

  • [ ] accept /

  • [ ] accept a dangling h for times that only have the hour specified (e.g 8h - 12h)

  • [ ] accept written-out weekdays and months (Thursday, December, ...)

  • [ ] translate midday and noon to 12:00, midnight to 0:00 (very low usage though, or rather, in strings where it is used, there are more problems with the syntax)

  • [ ] accept sundown as synonym to sunset (and sunup as synonym to sunrise? - didn't know this word existed, but it does)

  • [ ] just like for weekdays, accept certain German month abbreviations (e.g. Dez)

  • [ ] accept a single "." after weekday and months abbreviations (e.g. Dec., Mo.)

  • [ ] allow spaces in-between 10 : 00 (actually, this could also be valid in strict mode, as the spec does not forbid this)

westnordost avatar Jan 10 '24 00:01 westnordost