[PHP] Change day numbers

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
I've googled multiple times for this.

Basically I'm developing an app in which I need the week to start on Sunday, not Monday (PHP starts on Monday). Is there any way to modify this in any configuration files or a line of PHP code etc?

Any help would be greatly appreciated.

Cheers,
Mark
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Are you referring to strtotime() bug
No, basically PHP refers to Monday as the start of the week whereas I want it to start on Sunday for a website I'm building

I was hoping for some sort of ini_set(); fix but it doesn't see to be that way.

Seems my best bet is to use @BIOS' solution but IntlCalendar requires PHP 5.5.0>= and my PHP version is 5.3.29 so I'll need to update.
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,921
No, basically PHP refers to Monday as the start of the week whereas I want it to start on Sunday for a website I'm building

I was hoping for some sort of ini_set(); fix but it doesn't see to be that way.

Seems my best bet is to use @BIOS' solution but IntlCalendar requires PHP 5.5.0>= and my PHP version is 5.3.29 so I'll need to update.
What exactly are you trying to do? "PHP refers to Monday as the start of the week" doesn't paint a very good picture.

Also, yeah, you might want to upgrade, considering .
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
What exactly are you trying to do? "PHP refers to Monday as the start of the week" doesn't paint a very good picture.

Also, yeah, you might want to upgrade, considering .
I want the calendar week to start on Sunday, not Monday.
 

Users who are viewing this thread

Top