Migrate osm opening hours parsing to external library (#900)
* Fix: don't treat PH OpeningHours with specified time as `everyDay` * migrate to osm-opening-hours, add tests for openinghours parsing * Style nit * implement 'PH,Su off' * implement SpecificWeekdays * decrypt source code (a little) * fix constructor call in OpeningHoursTest.kt * lint * fix negative durations, add test for LastNth + test to combine everything implemented * add copyright note for osm-opening-hours * remove unused library
This commit is contained in:
@@ -228,4 +228,12 @@ val OpenSourceLicenses = arrayOf(
|
||||
url = "https://github.com/aallam/string-similarity-kotlin",
|
||||
copyrightNote = "Copyright (c) 2023 Mouaad Aallam",
|
||||
),
|
||||
OpenSourceLibrary(
|
||||
name = "osm-opening-hours",
|
||||
description = "Kotlin multiplatform library to parse OpenStreetMap opening hours",
|
||||
licenseName = R.string.mit_license_name,
|
||||
licenseText = R.raw.license_mit,
|
||||
url = "https://github.com/westnordost/osm-opening-hours",
|
||||
copyrightNote = "Copyright (c) 2024 Tobias Zwick",
|
||||
)
|
||||
)
|
||||
@@ -18,8 +18,7 @@ class OpeningScheduleTest(val date: LocalDateTime, val expected: Boolean) {
|
||||
|
||||
@Test
|
||||
fun isOpen() {
|
||||
val openingSchedule = OpeningSchedule(
|
||||
isTwentyFourSeven = false,
|
||||
val openingSchedule = OpeningSchedule.Hours(
|
||||
/**
|
||||
* Monday: 18:00 - Tue. 01:00
|
||||
* Tuesday: 10:00 - 00:00
|
||||
|
||||
Reference in New Issue
Block a user