Talk:Key:opening hours/specification

From OpenStreetMap Wiki
Jump to: navigation, search

Problems

As currently documented, multiple fallback rules, matter of fact multiple fallbacks to the fallbacks, are allowed. What about -simplifying- the grammar instead of allowing for endless more variants, with no actual use, no sensible interpretation and no implementation. SimonPoole (talk) 06:15, 11 August 2014 (UTC)

Specifying it this way is just simpler (not limiting the use of fallback rules). This is also supported by the evaluation tool. Note that you can also add additional selectors to fallback rules (which could be handy in some cases). What exactly do you mean by "simplifying"?? You might want to read my opinion about the syntax ;)--Ypid (talk) 23:19, 20 August 2014 (UTC)

<monthday_range> is not defined SimonPoole (talk) 10:05, 19 August 2014 (UTC)

Thanks, fixed it.--Ypid (talk) 00:24, 21 August 2014 (UTC)

The grammar suffers greatly from not specifying where white space is needed and where not, example is 2001Jan-Mar correct or 2001 Jan-Mar SimonPoole (talk) 10:30, 19 August 2014 (UTC)

Thanks very much. I am on it. Adding a space symbol is my next task. The evaluation tool can tell you where spaces are expected in the meantime. --Ypid (talk) 23:19, 20 August 2014 (UTC)

The semantic difference between

<holiday_sequence> , <weekday_sequence>

and

<holiday_sequence> <space> <weekday_sequence>

needs to be documented. BTW I believe the eval tool doesn't actually support SH,PH <weekday_sequence>. SimonPoole (talk) 12:42, 29 June 2017 (UTC)

Thanks, you are right. Spec updated and issue tracked: https://github.com/opening-hours/opening_hours.js/issues/233 (the issue might already be tracked somewhere else, I definitely noticed it already …).--Ypid (talk) 14:53, 29 June 2017 (UTC)
the addition should be linked to <weekday_selector> not <weekday_range> though.
Editing wiki tables has never been more fun (not). Fixed, thanks.--Ypid (talk) 16:15, 29 June 2017 (UTC)

For

[ <year> ] <month> - <month> / <positive_number>

the unit of <positive_number> is not defined.SimonPoole (talk) 12:46, 29 June 2017 (UTC)

Note: the specific syntax doesn't actually seem to be in use, and could be potentially deprecated/removed.SimonPoole (talk) 13:11, 29 June 2017 (UTC)

Not quite following. "Integer greater than zero". It is basically a count and not a real unit. Do you have a hint what you mean? You can also update the spec directly :)--Ypid (talk) 14:53, 29 June 2017 (UTC)
well does the count refer to days, weeks, months, centuries :-)?
Ah, right. In other occurrences of <positive_number> the unit is inferred from the previous unit. I think you are right that the syntax was never used. It seems this was a copy paste mistake when I was porting the spec from Netzwolf to the wiki syntax in https://wiki.openstreetmap.org/w/index.php?title=Template:Key:opening_hours/specification_table&oldid=1486201. opening_hours.js also does not support it. I removed it. Do you have this implemented by any chance?--Ypid (talk) 16:15, 29 June 2017 (UTC)
The parser parses it, but I didn't actually add an UI because I couldn't really add a reasonable label. SimonPoole (talk) 17:47, 29 June 2017 (UTC)

Ramadan as variable_date

In islamic countries restaurants are closed or have different opening hours during ramadan. Because ramadan is not always the same number of days, we might need both the beginning of ramadan and Eid. Elgaard (talk) 17:46, 6 September 2015 (UTC)

Sounds good. I guess defining it as <variable_date> makes sense. Maybe something like ramadan_begin and ramadan_end. Alternative tagging would be defining a second <plural_day_holiday>. I am not yet sure what is best here. Is there a need to refer the first and last day explicitly? Like specifiying different opening hours for the day before the beginning? Can you write an proposal for that? Checkout Proposed_features/opening_hours_open_end_fixed_time_extension as an example. Also you need to define how to calculate the ramadan dates or otherwise provide that information.--Ypid (talk) 19:06, 6 September 2015 (UTC)
Yes, plural_day_holiday is probably better. Because we can have two ramadan_begin in one Gregorian year, happens next time in 2030 Elgaard (talk) 18:00, 7 September 2015 (UTC)
Thanks for the info. In that case use plural_day_holiday … --Ypid (talk) 19:57, 7 September 2015 (UTC)


Daylight saving time as variable_date

Would it be possible to have periods where daylight saving is in effect as a variable date? Something along the lines of dst?

Adavidson (talk) 05:42, 11 January 2017 (UTC)