#32 closed defect (bug) (fixed)
Calendar makes no use of option "start_of_week"
Reported by: | anonymousbugger | Owned by: | ryan |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
In Wordpress 1.0 an option existed to switch the start of the week (monday or sunday). However the calendar always ignored this setting. In Wordpress 1.2 the option only exists in the database, has vanished from the options-page and the calendar still ignores it.
Attachments (3)
Change History (22)
#4
@
20 years ago
What do you mean by "functionality"? The option/setting or the whole get_calendar function? The bug i was trying to point out is the fact that get_calendar silently ignores existing settings (even if they are from previous versions, but they are there and should be used, shouldn't they?)
#5
@
20 years ago
I'm not sure it should be in the localisation files. Or at least, not only there. Perhaps the localisation files should provide a default which can be overridden with a setting in the DB.
#6
@
20 years ago
Attaching a patch for 1.2-epsilon-RC2 (which became 1.2-final next day) that makes calendar use the "start_of_the week" variable. Any testers? For me it does work, but it would be nice if anyone else would test it.
The patch was previously posted to the forums. It's not related to the sebbi.de one.
edited on: 06-16-04 18:11
edited on: 06-16-04 18:11
#7
@
20 years ago
I tested your patch, rq. It seemed to work, but there is the possibility that negative padding can occur. Unfortuneatly I have seen your patch _after_ i wrote my own (which worked, btw, in 1.0, too) ... i just could not live with the fact that my week should start sundays ... that is definetly too early :-)
#8
@
20 years ago
It also works for me.
In forums, there was also a comment about positive negative padding, but I don't think it CAN occur (unless someone proves i'm wrong).
the following function is used for padding, and it ALWAYS returns a positive value:
this one is used in get_calendar
function mod($num, $base) {
return ($num - $base*floor($num/$base));
}
So, I think, it's OK.
cunsidering the localization - i'd say that the _default_ start_of_the_week should be localized, and maybe it shouldn't even go to settings at all. However, I believe this is not the scope of this bug ("Calendar does _not_ use the setting at all").
#12
@
20 years ago
No it is not fixed in cvs ... come on, it should be easy enough and you would make us non-american wordpress-users very happy if we don't have to apply our own patches to the next release :-)
#13
@
20 years ago
oh please please please...
This is probably the only bug, patch of witch keeps me with 1.2-epsilon now ;/
#14
@
20 years ago
Meanwhile ... template-functions-general.php moved from version 1.35 to version 1.38 ... and no fix for that bug ... the wordpress-sphere still starts its week on sunday. Imagine! Starting on sunday would make sunday the ultimate evil (day) of the week ... monday is supposed to have this meaning (at least in Europe) ... so let us have that day as first day of the worker-slave's week ... please!!! :-)
#16
@
20 years ago
I found out that the patch doesn't work with the CVS version of files.
in fact, it seems like either the server or me makes the file unpatchable at all w/o modifications.
So in the next few days (i'll be away tomorrow and on sunday), I'll make another diff and put it here in a gzipped form. I HOPE that WILL go into the CVS.
#17
@
20 years ago
Attached a new gzipped diff against quite fresh CVS. This one should really work. Please patch the upstream with it, and let's squash this bug!
edited on: 07-25-04 18:09
#20
@
20 years ago
- Resolution changed from 10 to 20
- Status changed from assigned to closed
http://wordpress.org/pipermail/cvs_wordpress.org/2004-September/000368.html
http://wordpress.org/pipermail/cvs_wordpress.org/2004-September/000367.html
The starting day can be set via Options->General.
That functionnality will be moved to the localisation file.
If there is a reason for it not to be tied to localisation files, please bring it (we can't claim knowledge of every culture's start of week).