• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 I'd like Monday to be the first of week

Lile

New member
#1
In the calendar popup (e.g. search), Sunday is the default first day of week.

In some countries it is considered to be Monday.

How can I change this?

Thank you!
 

ge66

Active member
#3
I have had users complaining about picking the wrong date, because they thought Sunday was Monday. It would be nice to have a datepicker with the "right" first day of the week.
 

Martok

Well-known member
#5
Technically Sunday is the first day of the week.
No it's not in some countries, especially Europe. Monday is the first day of the week.

If you believe any religious stuff, "God created the world in 6 days. On the 7th day he rested." He didn't rest on the first day of the week. ;)
 

RobParker

Well-known member
#6
No it's not in some countries, especially Europe. Monday is the first day of the week.

If you believe any religious stuff, "God created the world in 6 days. On the 7th day he rested." He didn't rest on the first day of the week. ;)
And the sabbath was originally on Saturday :p
 

Martok

Well-known member
#7
And the sabbath was originally on Saturday :p
True, but for a long time now Sunday has traditionally been the day of rest after 6 days of work. That makes it the end of the week and Monday the first day. :)

Anyway, there should be an option to choose Sunday or Monday as the first day in the calendar.
 

RobParker

Well-known member
#9
True, but for a long time now Sunday has traditionally been the day of rest after 6 days of work. That makes it the end of the week and Monday the first day. :)

Anyway, there should be an option to choose Sunday or Monday as the first day in the calendar.
I completely agree that Monday is the start of the week but the whole "day of rest" reasoning is flawed.
 

Liam W

Well-known member
#10
By convention, Monday is the first day of the week. Anyone that says otherwise is just silly...

Weekend = Saturday & Sunday = No School/College
Workdays = Monday - Friday = School/College

The working week starts on a Monday... It just doesn't make sense any other way.
 

Martok

Well-known member
#11
I completely agree that Monday is the start of the week but the whole "day of rest" reasoning is flawed.
I disagree on the flawed argument but really, it doesn't matter which of us is right for or wrong in this. What is important is that there should be an option to choose the first day of the week in the calendar.
 

Chris D

XenForo developer
Staff member
#12
As Mike says, there's no option for this.

There is, however, a way of achieving this with a small code edit. You would need to reapply this after each XF upgrade.

The file to change is:
js/xenforo/xenforo.js

Open that file and search for:
Code:
lang:"_f",
That only appears once.

Change it to:
Code:
lang:"_f",firstDay:1,
0 is Sunday (default), 1 is Monday, 2 is Tuesday etc... so change it to whatever you like, if you were to change it to 3 for some odd reason:

upload_2014-10-5_17-51-36.png
 

Amaury

Well-known member
#13
The working week starts on a Monday... It just doesn't make sense any other way.
Most businesses are open and therefore have working employees every day of the week. To throw a random number, 99 out of 100 businesses are open on Sundays (e.g., Fred Meyer, a grocery store).

It's typically federal businesses that either aren't open on Sundays (post office) or the entire weekend (e.g., the district court), but everything else is open.
 

sbj

Well-known member
#14
As Mike says, there's no option for this.

There is, however, a way of achieving this with a small code edit. You would need to reapply this after each XF upgrade.

The file to change is:
js/xenforo/xenforo.js

Open that file and search for:
Code:
lang:"_f",
That only appears once.

Change it to:
Code:
lang:"_f",firstDay:1,
0 is Sunday (default), 1 is Monday, 2 is Tuesday etc... so change it to whatever you like, if you were to change it to 3 for some odd reason:

View attachment 85867
This isn't working anymore for 1.4.7 (previously worked for 1.4.6). I changed the xenforo.sj file after the upgrade to 1.4.7 again of course, as I do it since 1.4.0.
Maybe because of caching? Usually it worked instantaneously but not this time.
 

Chris D

XenForo developer
Staff member
#15
Nothing has changed so it should work as normal.

It's most likely caching. Usually hard refreshing the page should sort it out. Ctrl + F5.
 

ge66

Active member
#16
This isn't working anymore for 1.4.7 (previously worked for 1.4.6). I changed the xenforo.sj file after the upgrade to 1.4.7 again of course, as I do it since 1.4.0.
Maybe because of caching? Usually it worked instantaneously but not this time.
Still working for me on 1.4.7.
 

sbj

Well-known member
#17
Nothing has changed so it should work as normal.

It's most likely caching. Usually hard refreshing the page should sort it out. Ctrl + F5.
Yeah, it should, as it was a minor upgrade. I already tried a hard refresh, but it still doesn't work for me.
Any rebuilds I can do to refresh the date picker?

upload_2015-5-20_23-16-30.png
 

Chris D

XenForo developer
Staff member
#18
There is nothing else. If it has worked before, and you've done it the same way, then it should work again (just as it has for other people).
 
Last edited:

Aivaras

Active member
#19
As Mike says, there's no option for this.

There is, however, a way of achieving this with a small code edit. You would need to reapply this after each XF upgrade.

The file to change is:
js/xenforo/xenforo.js

Open that file and search for:
Code:
lang:"_f",
That only appears once.

Change it to:
Code:
lang:"_f",firstDay:1,
0 is Sunday (default), 1 is Monday, 2 is Tuesday etc... so change it to whatever you like, if you were to change it to 3 for some odd reason:

View attachment 85867
Is there a way to move the year in front of the month?

I want to go from this:

Before.png

to this:

After.png
 

ge66

Active member
#20
It is that time again, time to upgrade xenforo and time to do this file edit.
Please consider making it an option or just set monday to first day of the week.