Skip to main content
Known Participant
December 15, 2009
Answered

First Week of 2010

  • December 15, 2009
  • 3 replies
  • 537 views

Hi All,

I'm using CFMX 6.1 and facing an issue in getting the currect Week number of week starting 03-Jan-2010.

Coldfusion returns 2 for #Week('03-Jan-2010')#, but I wanted this to be as 1, as it is the first full week of the year.

Is there any way to acheive this with CFMX 6.1?

Many thanks

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Correct answer Adam Cameron.

    Roll your own: http://en.wikipedia.org/wiki/ISO_week_date.

    But first check whether someone's already done it and posted to cflib.org.

    --

    Adam

    3 replies

    Adam Cameron.Correct answer
    Inspiring
    December 15, 2009

    Roll your own: http://en.wikipedia.org/wiki/ISO_week_date.

    But first check whether someone's already done it and posted to cflib.org.

    --

    Adam

    Inspiring
    December 15, 2009

    Algorithm here: http://www.personal.ecu.edu/mccartyr/ISOwdALG.txt

    --
    Adam

    wmanuAuthor
    Known Participant
    December 15, 2009

    What a support, Adam.

    I found a UDF here: http://cflib.org/udf/ISOWeek

    Thanks a million for your help.