Skip to content

error on calling date by 'W' format string #14

@mdf092

Description

@mdf092

when calling by 'W' format string it returns:
index 'z' not define in $temp (line 164):
it could be fix by adding these lines:
if ($jmonth > 6) {
$v = 186 + (($jmonth - 6 - 1) * 30) + $jday;
}
else {
$v = (($jmonth - 1) * 31) + $jday;
}
self::$temp['z'] = $v;
so the final match-case for 'W' is:
case 'W':
if ($jmonth > 6) {
$v = 186 + (($jmonth - 6 - 1) * 30) + $jday;
}
else {
$v = (($jmonth - 1) * 31) + $jday;
}
self::$temp['z'] = $v;
$v = is_int(self::$temp['z'] / 7) ? (self::$temp['z'] / 7) : intval(self::$temp['z'] / 7 + 1);
break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions