Spec-Zone.ru › ColdFusion

week

From a date/time object, determines the week number within the year. An integer in the range 1-53; the ordinal of the week, within the year.

week(date) → returns numeric

Member Function Syntax

date.week()

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: hour minute second month quarter year

    Argument Reference

    date date
    Required

    A date/time object in the range 100 AD-9999 AD.

    calendar string
    Default: gregorian

    CF2016u8+ Indicates whether the week starts on Sunday (gregorian) or Monday (iso)
    Values:
    • gregorian
    • iso

    Compatibility

    ColdFusion:

    Member function is available in CF11+.

    Lucee:

    Member function is available in Lucee4.5+.

    Examples
    Sample code invoking the week function

    Week of a datetime object

    dt = createdatetime(2016,1,1,5,30,25);
    w = week( dt );
    writeoutput( w );

    Expected Result: 1

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/week

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API