1. 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

Discussion in 'XenForo Questions and Support' started by Lile, Oct 5, 2014.

  1. Lile

    Lile New Member

    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!
  2. Mike

    Mike XenForo Developer Staff Member

    I don't believe there is an option to change this as it stands.
  3. ge66

    ge66 Active Member

    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.
  4. Ernest L. Defoe

    Ernest L. Defoe Well-Known Member

    Technically Sunday is the first day of the week.
  5. Martok

    Martok Well-Known Member

    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. ;)
    ehd likes this.
  6. RobParker

    RobParker Well-Known Member

    And the sabbath was originally on Saturday :p
  7. Martok

    Martok Well-Known Member

    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.
  8. New Joe

    New Joe Active Member

    Monday is the first day of the week....
    Sunday is the second day of the weekend....
  9. RobParker

    RobParker Well-Known Member

    I completely agree that Monday is the start of the week but the whole "day of rest" reasoning is flawed.
  10. Liam W

    Liam W Well-Known Member

    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.
    imthebest likes this.
  11. Martok

    Martok Well-Known Member

    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.
  12. Chris D

    Chris D XenForo Developer Staff Member

    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:

    Open that file and search for:
    That only appears once.

    Change it to:
    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:

    CyclingTribe, Liam W, sbj and 4 others like this.
  13. Amaury

    Amaury Well-Known Member

    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.
  14. sbj

    sbj Well-Known Member

    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.
  15. Chris D

    Chris D XenForo Developer Staff Member

    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.
  16. ge66

    ge66 Active Member

    Still working for me on 1.4.7.
    sbj likes this.
  17. sbj

    sbj Well-Known Member

    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?

  18. Chris D

    Chris D XenForo Developer Staff Member

    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: May 21, 2015
  19. Aivaras

    Aivaras Active Member

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

    I want to go from this:


    to this:

  20. ge66

    ge66 Active Member

    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.

Share This Page