Date and time

Datetime Timezone Handling in Lucee CFML

Video on Timezones in Lucee

Functions

  • Beat()

    Outputs the current swatch/beat time.

  • ClearTimeZone()

    resets the timezone for the current request to Lucee default setting.

  • CreateDate()

    Creates a CFML date object from the given year, month and day

  • CreateDateTime()

    Creates a CFML date/time object from the given year, month, day, hour, minute and second

  • CreateODBCDate()

    Creates an ODBC date object.

  • CreateODBCDateTime()

    Creates an ODBC date-time object.

  • CreateODBCTime()

    Creates an ODBC time object.

  • CreateTime()

    Creates a CFML time object from the given hour, minute and second

  • CreateTimeSpan()

    Creates a timespan object that defines a time period.

  • DateAdd()

    Adds units of time to a date object.

  • DateCompare()

    Compares two dates to a given optional resolution

  • DateDiff()

    Determines the number of given date parts between two different dates

  • DateFormat()

    Formats a date string to a given output

  • DatePart()

    Extracts the given date part from the date object

  • DateTimeFormat()

    Formats a date/time string to a given output

  • Day()

    Determines the day of the month, in a date. The ordinal for the day of the month, ranging from 1 to 31.

  • DayOfWeek()

    Determines the day of the week, in a date.

  • DayOfWeekAsString()

    Determines the day of the week as a string from 1-7

  • DayOfWeekShortAsString()

    Returns the string representation of the given day index in short form

  • DayOfYear()

    Determines the day of the year, in a date.

  • DaysInYear()

    Determines the number of days in a year.

  • FirstDayOfMonth()

    Determines the ordinal (day number, in the year) of the first day of the month in which a given date falls.

  • GetHttpTimeString()

    Gets the current time, in the Universal Time code (UTC).

  • GetLocale()

    Gets the current geographic/language locale value.

  • GetLocaleInfo()

    returns info to a specific Locale

  • GetNumericDate()

    Returns a real number whose integer part represents the number of days since the EPOCH and whose fractional part represents the time value expressed in hours then divided by 24

  • GetTimeZone()

    returns the timezone defined for the current request.

  • GetTimeZoneInfo()

    Returns a structure representing the current timezone

  • Hour()

    Gets the current hour of the day. Ordinal value of the hour, in the range 0 - 23.

  • IsDate()

    Determines whether a string or Java object can be converted to a date/time value.

  • IsLeapYear()

    Determines whether a year is a leap year.

  • IsNumericDate()

    Evaluates whether a real number is a valid representation of a date (date/time object).

  • IsValid()

    Tests whether a value meets a validation or data type rule.

  • LSDateFormat()

    Formats a date string to a given output using the current sessions locale

  • LSDateTimeFormat()

    Formats a date string to a given output using the current locale

  • LSDayOfWeek()

    Returns the day of the week the date represents in locale format

  • LSIsDate()

    Determines whether a string is a valid representation of a date/time value in the current locale.

  • LSParseDateTime()

    Converts a string that is a valid date/time representation in the current locale into a date/time object.

  • LSTimeFormat()

    Formats a time string to a given output using the current locale.

  • LsWeek()

    Returns the week number in the year of the date referenced, based on the local influence.

  • Millisecond()

    Returns the milliseconds of the referenced date

  • Minute()

    Extracts the minute value from a date/time object.

  • Month()

    Extracts the month value from a date/time object.

  • MonthShortAsString()

    Returns the string label for the given month in short format

  • Now()

    Returns the current date and time

  • NowServer()

    this function is deprecated, returns the current time on the server independent on lucee timezone definition

  • ParseDateTime()

    Parses a date/time string according to the English (U.S.) locale conventions.

  • Quarter()

    Calculates the quarter of the year in which a date falls.

  • Second()

    Extracts the ordinal for the second from a date/time object.

  • SetLocale()

    Sets the country/language locale for CFML processing and the page returned to the client.

  • SetTimeZone()

    change the timezone definition for the current request.

  • TimeFormat()

    Formats a time string to a given output

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

  • Year()

    From a date/time object, gets the year value.

Methods

Objects

Categories

Guides