Protected Readonly_Protected ReadonlyluxonMicrosecond part of the DateTime (NOT microseconds since Unix epoch)
This value will not exceed 999 because above that will carry over to the millisecond part of the DateTime
The microsecond of the second (0–999)
Returns the epoch time in milliseconds as an integer, truncating any fractional part.
Returns the lowercase name of the weekday.
Weekday name: 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', or 'sunday'
StaticDATE_DateTime.toLocaleString format like 'October 14, 1983'
StaticDATE_DateTime.toLocaleString format like 'Tuesday, October 14, 1983'
StaticDATE_DateTime.toLocaleString format like 'Oct 14, 1983'
StaticDATE_DateTime.toLocaleString format like 'Fri, Oct 14, 1983'
StaticDATE_DateTime.toLocaleString format like 10/14/1983
StaticDATETIME_DateTime.toLocaleString format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
StaticDATETIME_DateTime.toLocaleString format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
StaticTIME_DateTime.toLocaleString format like '09:30', always 24-hour.
StaticTIME_DateTime.toLocaleString format like '09:30:23 Eastern Daylight Time', always 24-hour.
StaticTIME_DateTime.toLocaleString format like '09:30:23', always 24-hour.
StaticTIME_DateTime.toLocaleString format like '09:30:23 EDT', always 24-hour.
StaticTIME_DateTime.toLocaleString format like '09:30 AM'. Only 12-hour if the locale is.
StaticTIME_DateTime.toLocaleString format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
StaticTIME_DateTime.toLocaleString format like '09:30:23 AM'. Only 12-hour if the locale is.
StaticTIME_DateTime.toLocaleString format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
Returns the difference between this and another DateTime.
Supports microsecond precision when 'microseconds' is included in the unit parameter.
Object with only the specified units (or all units if not specified)
dt1.diff(dt2, 'days') // { days: 5 }
dt1.diff(dt2, ['days', 'hours']) // { days: 5, hours: 3 }
dt1.diff(dt2, ['milliseconds', 'microseconds']) // { milliseconds: 123, microseconds: 456 }
dt1.diff(dt2) // { years: 0, months: 0, days: 0, hours: 0, minutes: 0, seconds: 1, milliseconds: 500, microseconds: 0 }
Returns the difference between this DateTime and now.
Supports microsecond precision when 'microseconds' is included in the unit parameter.
Optionalunit: UUnit or units to return
Object with only the specified units (or all units if not specified)
Returns a new DateTime at the end of the given unit. Microsecond is 999 when unit is 'millisecond', else 0.
Unit to extend to end of
Optionalopts: { useLocaleWeeks?: boolean }Optional options
A new DateTime
Returns true if this and other represent the same instant and microsecond.
DateTime to compare
true if equal
Returns true if this DateTime is in the same unit as another.
DateTime to compare
Unit to compare
true if same
Subtracts a duration from this DateTime. Supports microsecond via DurationLikeObject. Fractional milliseconds are converted to microseconds (e.g., 1.5 ms = 1 ms + 500 µs).
Duration to subtract
A new DateTime
Adds a duration to this DateTime. Supports microsecond via DurationLikeObject. Fractional milliseconds are converted to microseconds (e.g., 1.5 ms = 1 ms + 500 µs).
Duration to add (DurationLikeObject with microsecond, or milliseconds number)
A new DateTime
Returns a new DateTime with the given locale/zone options. Microsecond is preserved.
Locale and/or zone options
A new DateTime
Returns a new DateTime with the given units set.
Object with units to set (year, month, day, hour, minute, second, millisecond, microsecond)
A new DateTime
Returns a new DateTime with the given locale. Microsecond is preserved.
Locale string (e.g. 'en-US', 'fr')
A new DateTime
Returns a new DateTime in the given zone. Microsecond is preserved.
Optionalzone: string | ZoneZone name or Zone instance
Optionalopts: { keepLocalTime?: boolean }Optional zone options (keepLocalTime, etc.)
A new DateTime
Returns a new DateTime at the start of the given unit. Microsecond is 0 except when unit is 'millisecond' (then preserved).
Unit to truncate to (year, month, day, hour, minute, second, millisecond)
Optionalopts: { useLocaleWeeks?: boolean }Optional options
A new DateTime
Returns a string representation using a format string. Supports all Luxon format tokens. Fractional second tokens (S, SSS, SSSSSS) are enhanced to include microseconds beyond Luxon's millisecond precision.
Format string (e.g., 'yyyy-MM-dd HH:mm:ss', 'yyyy-MM-dd HH:mm:ss.SSSSSS')
Optionalopts: LocaleOptionsOptional locale options
Formatted string
Returns an ISO 8601 string with 6 fractional second digits (milliseconds + microseconds).
Preserves the timezone of the DateTime instance.
Optionalopts: ToISOTimeOptionsOptional format options
If true, omits fractional seconds when they are zero
If true, omits seconds when they are zero
If true, includes timezone offset
Format variant: 'basic' (compact) or 'extended' (default, with separators)
ISO string (e.g. "2024-03-15T10:30:45.123456-05:00" or "2024-03-15T10:30:45.123456Z")
Returns the time portion in ISO format with 6 fractional second digits.
Omits timezone offset by default (e.g., '10:30:45.123456').
Optionalopts: ToISOTimeOptionsOptional format options
If true, omits fractional seconds when they are zero
If true, omits seconds when they are zero
If true, includes timezone offset
Format variant: 'basic' (compact) or 'extended' (default, with colons)
Time string (e.g. "10:30:45.123456" or "10:30:45.123456-05:00")
Returns an ISO 8601 formatted string for JSON serialization. This ensures DateTime objects are properly serialized to ISO format.
Preserves the timezone of the DateTime instance.
ISO datetime string with microsecond precision
Returns a new DateTime in the system's local zone. Microsecond is preserved.
A new DateTime in local zone
Returns a localized string representation.
OptionalformatOpts: DateTimeFormatOptionsIntl.DateTimeFormat options for formatting
Optionalopts: LocaleOptionsOptional locale configuration
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
Localized string
Returns the epoch time in seconds, including fractional milliseconds. Includes microsecond precision in the fractional part.
Unix timestamp in seconds (with fractional milliseconds)
Returns an SQL time string with 6 fractional second digits.
Omits timezone offset by default.
Optional SQL time format options
OptionalincludeOffset?: booleanIf true, includes timezone offset
SQL time string (e.g. "10:30:45.123456")
Returns an ISO 8601 formatted string representation. Alias for toISO().
Preserves the timezone of the DateTime instance.
ISO datetime string with microsecond precision
Returns a new DateTime in UTC. Microsecond is preserved.
Optionaloffset: numberOptional offset in minutes
Optionalopts: { keepLocalTime?: boolean }Optional zone options
A new DateTime in UTC
StaticfromCreate a DateTime from a custom format string. Supports standard Luxon format tokens plus 'u' or 'SSSSSS' for microseconds (6 decimal places).
The string to parse
Format string using Luxon tokens (e.g., 'MM/dd/yyyy HH:mm:ss.u')
Optionalopts: DateTimeOptionsOptional parsing options (zone, locale, etc.)
A DateTime for the parsed instant
DateTime.fromFormat('12/15/2017', 'MM/dd/yyyy')
DateTime.fromFormat('12/15/2017 10:30:45', 'MM/dd/yyyy HH:mm:ss')
DateTime.fromFormat('12/15/2017 10:30:45.123456', 'MM/dd/yyyy HH:mm:ss.u')
DateTime.fromFormat('12/15/2017 10:30:45.123456', 'MM/dd/yyyy HH:mm:ss.SSSSSS')
DateTime.fromFormat('mai 25, 1982', 'MMMM dd, yyyy', { locale: 'fr' })
StaticfromCreate a DateTime from an ISO 8601 string.
ISO string (e.g. "2024-03-15T10:30:45.123456-05:00"); parses up to 6 fractional second digits
Optionalopts: DateTimeOptionsOptional configuration
Timezone to interpret/convert the datetime in (defaults to UTC)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime for the parsed instant
StaticfromCreate a DateTime from a JavaScript Date.
A JavaScript Date instance
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone for the result (IANA timezone name or Zone object)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime representing the same instant
StaticfromCreate a DateTime from epoch microseconds.
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone for the result (IANA timezone name or Zone object)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime for the given instant
StaticfromCreate a DateTime from epoch milliseconds.
Unix timestamp in milliseconds (fractional part becomes microseconds)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone for the result (IANA timezone name or Zone object)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime for the given instant
StaticfromCreate a DateTime from an object with date/time units. Fractional milliseconds are converted to microseconds (e.g., 1.5 ms = 1 ms + 500 µs).
Object with year, month, day, hour, minute, second, millisecond, microsecond
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone for the datetime (IANA timezone name or Zone object)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime for the given components
StaticfromCreate a DateTime from epoch seconds. Fractional seconds are converted to milliseconds and microseconds.
Unix timestamp in seconds (fractional part becomes ms + µs)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone for the result (IANA timezone name or Zone object)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime for the given instant
StaticfromCreate a DateTime from an SQL datetime string.
SQL string (e.g. "2024-03-15 10:30:45.123456"); parses up to 6 fractional second digits
Optionalopts: DateTimeOptionsOptional configuration
Timezone to interpret the datetime in (overrides timezone in string)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime for the parsed instant
StaticlocalCreate a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Minute (0–59)
Second (0–59)
Millisecond (0–999)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Minute (0–59)
Second (0–59)
Millisecond (0–999)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Minute (0–59)
Second (0–59)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Minute (0–59)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
Create a local DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Optionalopts: DateTimeJSOptionsOptional configuration
Timezone (IANA timezone name or Zone object, defaults to local)
Locale string (e.g., 'en-US', 'fr-FR')
Numbering system (e.g., 'arab', 'beng')
Calendar system (e.g., 'islamic', 'hebrew')
A DateTime in the local zone
DateTime.local() // now
DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
StaticmaxStaticminStaticnowReturns the current time in the system's local zone.
A DateTime for the current instant
StaticutcCreate a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Minute (0–59)
Second (0–59)
Millisecond (0–999)
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
Create a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Minute (0–59)
Second (0–59)
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
Create a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Minute (0–59)
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
Create a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Hour (0–23)
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
Create a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Day of month
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
Create a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Month (1–12)
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
Create a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
Create a UTC DateTime. Accepts the same overloads as Luxon plus an optional microsecond (8th numeric arg). The last argument may be an options object instead of a time component.
Optionalopts: LocaleOptionsOptions (locale, etc.)
A DateTime in UTC
DateTime wraps Luxon DateTime with microsecond precision (0-999). The decimal part in ISO/SQL is 6 digits: first 3 = milliseconds, next 3 = microseconds.
Full datetime output with toSQL() is normalized to UTC. Time-only output (toISOTime, toSQLTime) omits timezone offset by default. toISO() preserves the timezone of the DateTime instance.