Skip to main content
pierredupli
Participating Frequently
January 5, 2016
Answered

What is the week number given by function "week" ?

  • January 5, 2016
  • 2 replies
  • 437 views

Just using function "week" which gives 2 as week number for monday January 4th which is wrong.

According to ISO standard, week number one is the week containing January 4th.

Regards,

Pierre.

    This topic has been closed for replies.
    Correct answer BKBK

    Yes, ColdFusion's week numbering system is different from the ISO date standard. For example, in ColdFusion the week begins on Sunday. Whereas in the ISO standard it begins on Monday.

    There is nothing wrong with that. The ISO standard is a convention, and is not mandatory

    2 replies

    WolfShade
    Legend
    January 5, 2016

    Seeing as 01 JAN and 02 JAN are Friday and Saturday, respectively, wouldn't that be week 1, regardless of ISO standard?  04 JAN is the first Monday, yes, but (by the calendar) is the second week.

    V/r,

    ^_^

    UPDATE: Ah, I see.. the ISO standard is counting the first week of the year as the first week that has a Thursday in it.. and uses Monday as the start of the week.  That may be ISO standard, but since different cultures see the start/end of the week in different ways, this cannot be relied upon.  And, as BKBK‌ mentions, isn't really mandatory, anyway.

    BKBK
    Community Expert
    BKBKCommunity ExpertCorrect answer
    Community Expert
    January 5, 2016

    Yes, ColdFusion's week numbering system is different from the ISO date standard. For example, in ColdFusion the week begins on Sunday. Whereas in the ISO standard it begins on Monday.

    There is nothing wrong with that. The ISO standard is a convention, and is not mandatory