Proposal talk:Opening hours workday extension

From OpenStreetMap Wiki
Jump to navigation Jump to search

Implementability

It's not meaningful to suggest changing opening_hours=* without looking at the https://github.com/opening-hours/opening_hours.js directly. A reason of having PH is it can't be explicit. Workdays can be expressed by day-of-week. It's not necessary to be implicit. WR overlaps with PH -1 day more limitedly, and fails at PH +1 day (besides the ambiguity) or PH -7 days and other more complicated conditions. —— Kovposch (talk) 06:18, 8 August 2023 (UTC)

The problem with PH -1 day is it doesn't include the day before a Sunday. How do you express the first example I have on the proposal page using the current syntax? --Riiga (talk) 13:21, 8 August 2023 (UTC)
Why isn't Saturday usable? —— Kovposch (talk) 12:45, 16 August 2023 (UTC)
I guess it might be, see the section below where I also discussed this with another user. You might be right in that the combination of PH-1,Sa could work. --Riiga (talk) 06:38, 18 August 2023 (UTC)

Why WR?

I can fully see why a WD regulation would make things easier, even though we can already describe this. It will make things a lot easier to manage. However, if WR simply means PH-1,Sa then I don't see why we need it. Am I missing something? --Nadjita (talk) 13:10, 16 August 2023 (UTC)

You might be right, if that's allowed by the opening hours syntax. I think it covers what I'm trying to map, but what prompted me to search for alternatives was that in my local legislation it's all defined on the basis of workdays, so using PH-1,Sa is a bit counterintuitive and a definition of WR as "a workday before a Sunday/day of rest or public holiday" is more in line with that, though I guess PH-1,Sa is equivalent in all cases but the definition itself. --Riiga (talk) 06:37, 18 August 2023 (UTC)
"[...], even though we can already describe this." Which is a reason for me not to add WD, because it's just a duplicate for the explicit days. It would also make things for applications easier (SimonPoole mentions this below), since WD is country/region specific, giving the days, however, is independent of the region.--Hauke-stieler (talk) 10:24, 27 August 2023 (UTC)
My personal experience is that a lot of people don't have a clue what the official working days for their region are and how this would be tagged. I can live without an extra WD, but it would certainly make the whole thing easier to manage and read. "giving the days, however, is independent of the region." since public holidays are no working days, it will always be depending on the region. As I said: I can live without this proposal, but I can see a clear benefit of improving the schema with this token. Already, most opening_hours I see over here don't add ;PH off (where appropriate) at the end. Not sure if it's the editors' fault or what else though. --Nadjita (talk) 11:29, 27 August 2023 (UTC)
In some countries public holidays leading to shifting workdays and rest days, in order to accumulate a longer rest period. For example in China, if Tuesday is a public holiday usually the Saturday before (or afterwards) will transfer into a work day and the Monday before public holiday will transfer to a rest day. Though there are also not really opening hours depending on that. Shops are kind of always open the same time span, except for smaller shops, which might close especially during the Chunyun. But this is kind of random. So in summary I see not much of a benefit for OSM introducing it. --Aighes (talk) 20:19, 27 August 2023 (UTC)

Only include tokens for things that are well defined

The major issue with this proposal is that the concept of workday tends to not have any kind of consistent definition even within the same legislation. SimonPoole (talk)

The same goes for PH and SH. Has that been an issue so far? --Nadjita (talk) 16:06, 16 August 2023 (UTC)
To answer the 2nd question 1st: yes, it makes opening hours evaluation a pain relying on external data for which there is no standard format. But the more important difference is that you can actually determine the public holidays for a specific geographic region, however as I wrote the problem with defining workdays is that it is completely unclear what workdays should be, in particular in western countries if Saturday should be included or not. SimonPoole (talk) 20:45, 16 August 2023 (UTC)
So you're saying that you can determine the public holidays for a specific region, but not how working days are defined? My guess is that it's complicated to compile a list, but certainly less problematic than for public holidays, which even change on a yearly basis. I'm agnostic towards the approach, because I can usually calculate working days. I've noticed, however, that a lot of people don't know that Saturday is a working day in my region. So defining Working Day as a token in opening_hours would certainly reduce the amount of erroneous opening hours --Nadjita (talk) 06:25, 17 August 2023 (UTC)
Yes, I too think that its way easier that determine public holidays for a specific region, but not how working days are defined. For example, in Croatia, public holidays are well known and defined by law. Any interested party can retrieve them. Working days however vary greatly, and are defined by specific workplace as they deem fit. For many office workers, those would probably be either Mo-Fr or Mo-Sa. But nightclubs, restaurants etc. (which do most of their profits on Fr,Sa,Su) would more usually be Tu-Su or We-Mo, with some even being only Fr-Su! Fuel stations would be most likely be Mo-Su, as would some shops (but others would be Mo-Fr or Mo-Fr,Sa with shorter working hours on Sa). Implementing something like WD would be terrible, not solving anything but instead shifting responsibility of parsing the opening hours from the mapper (who is expected to know more about the things they are mapping, and are there on the ground and can make sure what data it actually is, in clearest possible way!) to plain OSM users to whom it would be totally ambiguous (not only they might be from out of the country, but many countries have varying workdays as noted above, and commons users are not there on the ground in front of the shop, as they are just trying to decide what place is open so they can decide where to go!) As a sidenote (but don't get sidetracked by it): ideally, it would be best to also get rid of PH and SH which can ambiguous (for example, in Croatia not all public holidays are treated the same - e.g. many shops will happily work on New year but not on Easter, but not all of them) when possible and replace them with precise dates, but the issue with that idea is that not all holidays are on fixed dates, and even when they are, max tag length of 255 chars is prohibitive to implementing it, so PH it is. --mnalis (talk) 22:14, 25 August 2023 (UTC)
"Working days however vary greatly, and are defined by specific workplace as they deem fit" I don't think a sign saying "Parking allow Mo-Fr 8:00-12:00 on working days" depends on where you are working. You might be mixing up the official definition of what working days are with the days people actually have to work. If you don't have such signs in your country, then it's probably not worth discussing it for your case. --Nadjita (talk) 11:15, 27 August 2023 (UTC)
Yes, a sign saying "Parking allowed Mo-Fr 8:00-12:00 on working days" probably has some clear legal definition of what counts as a working day. The problem is that this definition may be different for other situations - for example, at least in Germany, there is no clear legal definition for opening times. For a shop, most people would probably consider Saturday a working day (because those are typically open on Saturday), but for a government office usually not. So if you have "opening_hours=WD 8:00-12:00" most people would probably be unsure about whether this means Mo-Fr or Mo-Sa. Sleske (talk) 11:58, 17 September 2023 (UTC)
Yes, PH would be something not that relevant. Depending on your region, it might be about 10 days/year, so something you could simply ignore, if you don't want to pay the effort. Weekdays are more essential, you can't ignore them and it's hard to get it's definition. Additional I would believe even within one country multiple definition might exist, what is a workday and what is a rest day, depending on the context. I see the benefit in the current system, that a local (mapper) transfers this information into globally understandable system. Even in Germany, were you ususlly find a law for everythign, so far I know there is no law what "werktags" means on that sign, there are only verdicts existing, that it should follow the same definition as stated in BUrlG, which is actually a law for securing restdays for workers. --Aighes (talk) 20:08, 27 August 2023 (UTC)
I agree with SimonPoole - concept of workday is not universal. For example, in Germany, Saturday counts as a working day (Werktag) in most laws and regulations, but in common usage it is often not considered a working day - so for Germany, many mappers would be confused. Sleske (talk) 10:09, 17 September 2023 (UTC)