Open frase-git opened 3 years ago
Right, makes sense. But what about week_end_day_1
and week_end_day_2
? Does it even make sense to have separate settings for these three? In other words, isn't the weekend always the two days before the start of the week (that is for the Gregorian calendar; other calendars are not supported anyway).
I think that the weekends always result from the beginning of the week.
So _week_end_day1 and _week_end_day2 could be omitted as configuration option - I guess.
Sure: This can only apply to the Gregorian calendar. We don't have anything else ;-)
Well, it might not be that simple: https://en.wikipedia.org/wiki/Workweek_and_weekend. Sigh. For BC reasons, I won't touch the weekend day settings for 2.x (it should currently be possible to set both to the same day).
Still, I think it makes sense to move the start of the week setting to the language, but for BC reasons only make that effective, if the respective configuration setting is not available (i.e. users must remove it from config.php and defaultconfig.php after update).
However, I'm not sure how the language setting actually should work. Since there is no type info for language texts, we cannot have a nice checkbox. And actually, this should probaly don't be a boolean setting at all. Should we allow to enter the name of the day to start the week (Sunday
, Monday
, …, or maybe an abbreviation, perhaps even the abbreviation in the daynames_array
)? What would be the default in case of an empty or invalid value?
Tentatively setting the 2.1 Milestone. @frase-git, do you need this, or would it just be a nice-have?
You're right, it's all not so simple.
In the language settings I would enter the beginning of the week as text. So: Mo, Tu, We ... etc. according to daynames_array (and not allow anything else). As default value in case of wrong input: Mo, because it is like this in most countries.
And by the way: I don't need it urgently at the moment ;-) I only noticed this question while dealing with the calendar.
In the language settings I would enter the beginning of the week as text. So: Mo, Tu, We ... etc. according to daynames_array (and not allow anything else). As default value in case of wrong input: Mo, because it is like this in most countries.
That makes perfect sense. Thanks!
And by the way: I don't need it urgently at the moment ;-)
Fine. I'll postpone that then to get out Calendar_XH 2.1 sooner.
It would be desirable to be able to set the start of the week (Mon/Sun) depending on the language.