Ticket #632 (closed Patch: fixed)

Opened 6 months ago

Last modified 4 months ago

Calendar Library - i18n and start_monday patch

Reported by: dyron Owned by: Shadowhand
Priority: minor Milestone: 2.2
Component: Libraries Version: SVN HEAD
Keywords: Calendar start_monday i18n Cc:

Description

Actually for June 2008 if the start_monday ist true, the calendar lib is adding a number at the end.

Line 160:

if (($w = (int) date('w', $first)) > $this->week_start)

in

(($w = (int) date('w', $first) - $this->week_start) < 0) and $w = 6;

if ($w != 0)

and line 166:

for ($i = $n - $w + $this->week_start + 1, $t = $w - $this->week_start; $t > 0; $t--, $i++)

in

for ($i = $n - $w + 1, $t = $w; $t > 0; $t--, $i++)

I hope this works.

Attachments

Calendar.patch (1.1 kB) - added by dyron 5 months ago.
calendar.patch (4.1 kB) - added by dyron 5 months ago.
calendar_new.diff (18.1 kB) - added by dyron 4 months ago.
New version
calendar.diff (0.7 kB) - added by dyron 4 months ago.
hoping the last real useful diff

Change History

Changed 5 months ago by dyron

Changed 5 months ago by dyron

Changed 5 months ago by dyron

  • keywords i18n added
  • summary changed from Calendar Library - start_monday patch to Calendar Library - i18n and start_monday patch

Changed 4 months ago by Shadowhand

  • owner changed from - No owner - to Shadowhand
  • status changed from new to assigned

Changed 4 months ago by dyron

Another "bug" with the trailing days

Line 222

if (($w = (int) date('w', $last) - $this->week_start) < 6 )

in

$w = (int) date('w', $last) - $this->week_start;

if ($w > -1 and $w < 6)

Changed 4 months ago by Shadowhand

date calls should also be replaced with strftime calls, where possible.

Changed 4 months ago by Shadowhand

  • milestone set to 2.2

Fixes in r3184 and r3185 and r3186.

Some months now have one day too much padding. See 6/2008, for example.

Changed 4 months ago by dyron

New version

Changed 4 months ago by Shadowhand

Your patch seems to be busted, it shows the entire library as being replaced.

Changed 4 months ago by dyron

TortoiseMerge? has been make this *.diff file. I know, that's looks like a total replace, but there are only 2 lines difference. I'll try to create a new *.diff.

Changed 4 months ago by dyron

hoping the last real useful diff

Changed 4 months ago by Shadowhand

This still isn't a proper patch, it doesn't contain file information and the add/remove direction is backwards.

Changed 4 months ago by Shadowhand

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r3279. Thanks for the perseverance!

Note: See TracTickets for help on using tickets.