Spec-Zone.ru › ColdFusion

dayOfYear

Determines the day of the year, in a date.

dayOfYear(date) → returns numeric

Member Function Syntax

date.dayOfYear()

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: day dayOfWeek dayOfWeekAsString daysInMonth daysInYear firstDayOfMonth

    Argument Reference

    date date
    Required

    Date or datetime object (100AD-9999AD).

    Compatibility

    ColdFusion:

    Member function is available in CF11+.

    Lucee:

    Lucee allows an optional timezone parameter. Member function is available in Lucee4.5+.

    Examples
    Sample code invoking the dayOfYear function

    Determines the day of the year

    Uses the dayOfYear function to determine the day of the year

    <cfset Date = CreateDate(2012, 12, 30)>
    <cfset result = dayOfYear(Date)>
    <cfoutput>#result#</cfoutput>

    Expected Result: 365

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

    Spec-Zone.ru

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