Ticket #503 (closed Bug: fixed)

Opened 9 months ago

Last modified 8 months ago

Calendar Library - Number of days in the previous month

Reported by: dyron Owned by: Shadowhand
Priority: minor Milestone: 2.1.2
Component: Libraries Version: SVN HEAD
Keywords: calendar Cc:

Description

There is an argument missing in the calendar lib line 79:

$n = (int) date('t', mktime(1, 0, $this->month - 1, 1, $this->year));

It should be

$n = (int) date('t', mktime(1, 0, 0, $this->month - 1, 1, $this->year));

Otherwise the end days are miscalculated.

Change History

Changed 9 months ago by dyron

In addtion I changed line 83:

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

in

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

Changed 9 months ago by Shadowhand

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

Changed 8 months ago by Shadowhand

  • priority changed from trivial to minor
  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r2476 and r2477.

Note: See TracTickets for help on using tickets.