#221 Week numbers

Next_Release
open
nobody
None
5
2016-07-18
2014-07-14
Anders
No

At least in the Swedish educational system, the week number is the basic form of organizing a calendar, so people are really obsessed with them. Allowing for week numbers as part of the date could be valuable in Booked. It would only need a few lines of code - this is my suggestion:

In /lib/Common/Date.php and the function InitializeParts(), change the row

$parts = explode(' ', $this->date->format('H i s m d Y w'));

into

$parts = explode(' ', $this->date->format('H i s m d Y w W'));

and then add

$this->parts['wnumber'] = $parts[7];

at end of that function.

Also, after e.g. the function Month()
add
public function Weeknumber()
{
return $this->parts['wnumber'];
}

/Anders

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks