WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#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)

0000032-template-functions-general.diff (2.1 KB) - added by anonymousbugger 9 years ago.
0000032-template-functions-general.diff.gz (883 bytes) - added by anonymousbugger 9 years ago.
0000032-template-functions-general.diff.2.gz (883 bytes) - added by anonymousbugger 9 years ago.

Download all attachments as: .zip

Change History (22)

comment:2 michel v10 years ago

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).

comment:3 michel v10 years ago

  • Status changed from new to assigned

comment:4 anonymousbugger10 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?)

comment:5 JasonV10 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.

comment:6 rq10 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

comment:7 Sebbi10 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 :-)

comment:8 rq10 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").

comment:9 rq10 years ago

so is it fixed in CVS?

comment:10 Anne10 years ago

Probably not, this bug hasn't been assigned yet.

comment:11 rq10 years ago

Why not? We do have a patch, and yet noone can take care of applying it?..

comment:12 Sebbi10 years ago

http://cvs.sourceforge.net/viewcvs.py/cafelog/wordpress/wp-includes/template-functions-general.php?rev=1.35&view=auto

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 :-)

comment:13 anonymousbugger10 years ago

oh please please please...

This is probably the only bug, patch of witch keeps me with 1.2-epsilon now ;/

comment:14 anonymousbugger10 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!!! :-)

comment:15 rq10 years ago

dear developers,
is it so darn hard to apply a little diff??????

Love,
RQ

comment:16 rq10 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.

comment:17 rq10 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

comment:18 rq10 years ago

updated patch uploaded

comment:19 ryan10 years ago

  • Owner changed from anonymous to rboren

comment:20 ryan10 years ago

  • Resolution changed from 10 to 20
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.