Skip to content

Releases: MoralCode/parse-opening-hours

v0.4.2

25 Jun 16:19
Compare
Choose a tag to compare
  • convert times to military time when printing the string reperesentation of a Times object
  • correctly handle strings like "12pm" and "12am" so they correctly parse to "12:00" and "0:00" in military time respectively

v0.4.1

30 May 22:59
Compare
Choose a tag to compare
  • Make the internal Times object available for import to allow for parsing a known time string (i.e. "700AM-500PM")

v0.4

27 May 01:08
Compare
Choose a tag to compare
  • support optional prefix of "open" on strings, like "open monday 9am-5pm"
  • support shortcuts like "open 24 hours a day" and "24/7"
  • package is now imported as opening_hours instead of parse_opening_hours (see example in README)

v0.3 re-release

16 May 06:01
Compare
Choose a tag to compare

The pypi build for v0.3 contained additional information from the local working tree that was not committed to the repository and may have introduced some unintended behavior (all tests still passed though). This re-build and re-release removes this information from the production package.

v0.3

16 May 05:54
Compare
Choose a tag to compare
  • [BREAKING] rename the main class to OpeningHours since its not exclusive to json
  • more refactoring and cleanup
  • add generated documentation page
  • improve robustness of some of the matching patterns
  • count the single-letter "H" as "thursday" when used as a day (i.e. "H 9am - 5 pm")
  • parse the word "from" as a separator between dates and times (i.e. "Monday from 9:00 - 5:00")
  • support dots following abbreviated days of the week (i.e. "Mon.")
  • support commas separating days and times (i.e. Monday, 9am - 5pm")
  • support times in military style (i.e. "Monday 0900-1700")
  • support short/abbreviated AM/PM designations (i.e. "9a - 5p" and "9a. to 5p.")

v0.2

07 May 05:36
Compare
Choose a tag to compare

Changelog

  • support plural day names with appostrophes (i.e. "Monday's 9am to 5 pm")
  • support listing specific days (i.e. "Mondays, Tuesdays, Thursdays 9am to 5 pm")
  • add support for commonly used shortcuts like "7 days a week" "daily" "weekdays" "business days" "weekends" .etc
  • treat no specified days (i.e. "9am to 5pm") the same as "every day"
  • made parsing of day names more robust

Basic first release

03 May 16:51
Compare
Choose a tag to compare

This release is what could be considered an MVP. it can handle basic strings like "Mon- Fri 9:00am - 5:30pm" (with some variations in day and time format) and has test cases covering most if not all of these