Date and time
Datetime Timezone Handling in Lucee CFML
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
- datetime.add() Adds units of time to a date.
- datetime.compare() Compares to date, to the given optional resolution.
- datetime.dateFormat() Formats a date string to a given output
- datetime.dateTimeFormat() Formats a date/time string to a given output
- datetime.day() Determines the day of the month, in a date. The ordinal for the day of the month, ranging from 1 to 31.
- datetime.dayOfWeek() Determines the day of the week, in a date.
- datetime.dayOfYear() Determines the day of the year, in a date.
- datetime.daysInMonth() Determines the number of days in a month.
- datetime.daysInYear() Determines the number of days in a year.
- datetime.diff() Determines the number of given date parts between two different dates
- datetime.firstDayOfMonth() Determines the ordinal (day number, in the year) of the first day of the month in which a given date falls.
- datetime.hour() Gets the current hour of the day. Ordinal value of the hour, in the range 0 - 23.
- datetime.LSDateFormat() Formats a date string to a given output using the current sessions locale
- datetime.LSDateTimeFormat() Formats a date string to a given output using the current locale
- datetime.LSDayOfWeek() Returns the day of the week the date represents in locale format
- datetime.LSTimeFormat() Formats a time string to a given output using the current locale.
- datetime.millisecond() Returns the milliseconds of the referenced date
- datetime.minute() Extracts the minute value from a date/time object.
- datetime.month() Extracts the month value from a date/time object.
- datetime.part() Extracts the given date part from the date object
- datetime.quarter() Calculates the quarter of the year in which a date falls.
- datetime.second() Extracts the ordinal for the second from a date/time object.
- datetime.timeFormat() Formats a time string to a given output
- datetime.week() From a date/time object, determines the week number within the year.
- datetime.year() From a date/time object, gets the year value.
- string.parseDateTime() Parses a date/time string according to the English (U.S.) locale conventions.
Objects
Categories
Guides
- Configuring Regional Settings Lucee by default, uses the JVM's default timezone, which comes from the operating system.
- Custom Date and Time format for a Locale using .df files This documentation shows how to set the custom date and time format using .df files