Lightning Aura Components Developer Guide
Summer '26 (API version 67.0)
Spring '26 (API version 66.0)
Winter '26 (API version 65.0)
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Winter '21 (API version 50.0)
Summer '20 (API version 49.0)
Spring '20 (API version 48.0)
Winter '20 (API version 47.0)
Summer '19 (API version 46.0)
Spring '19 (API version 45.0)
Winter '19 (API version 44.0)
Summer '18 (API version 43.0)
Spring '18 (API version 42.0)
Winter '18 (API version 41.0)
Summer '17 (API version 40.0)
Spring '17 (API version 39.0)
Winter '17 (API version 38.0)
Summer '16 (API version 37.0)
Spring '16 (API version 36.0)
Winter '16 (API version 35.0)
Summer '15 (API version 34.0)
Spring '15 (API version 33.0)
Winter '15 (API version 32.0)
Developing Secure Code
Testing Components
UTCToWallTime()
WallTimeToUTC
displayDuration()
displayDurationInDays()
displayDurationInHours()
displayDurationInMilliseconds()
displayDurationInMinutes()
displayDurationInMonths()
displayDurationInSeconds()
duration()
endOf()
formatCurrency()
formatDate()
formatDateTime()
formatDateTimeUTC()
formatDateUTC()
formatNumber()
formatPercent()
formatTime()
formatTimeUTC()
getDateStringBasedOnTimezone
getDaysInDuration()
getDefaultCurrencyFormat()
getDefaultNumberFormat()
getDefaultPercentFormat()
getHoursInDuration()
getLocalizedDateTimeLabels()
getMillisecondsInDuration()
getMinutesInDuration()
getMonthsInDuration()
getNumberFormat()
getSecondsInDuration()
getToday
getYearsInDuration()
isAfter()
isBefore()
isBetween()
isPeriodTimeView()
isSame()
parseDateTime()
parseDateTimeISO8601()
parseDateTimeUTC()
startOf()
toISOString()
translateFromLocalizedDigits()
translateFromOtherCalendar()
translateToLocalizedDigits()
translateToOtherCalendar()
AuraLocalizationService
AuraLocalizationService provides methods for
formatting and localizing dates. Use $A.localizationService to use the methods in AuraLocalizationService.
Methods
-
UTCToWallTime()
Converts a datetime from UTC to a specified timezone. -
WallTimeToUTC
Converts a datetime from a specified timezone to UTC. -
displayDuration()
Displays a length of time. -
displayDurationInDays()
Displays a length of time in days. -
displayDurationInHours()
Displays a length of time in hours. -
displayDurationInMilliseconds()
Displays a length of time in milliseconds. -
displayDurationInMinutes()
Displays a length of time in minutes. -
displayDurationInMonths()
Displays a length of time in months. -
displayDurationInSeconds()
Displays a length of time in seconds. -
duration()
Returns an object representing a length of time. -
endOf()
Returns a date that is the end of a unit of time for the given date. -
formatCurrency()
Returns a currency number based on the default currency format. -
formatDate()
Returns a formatted date. -
formatDateTime()
Returns a formatted date time. -
formatDateTimeUTC()
Returns a formatted date time in UTC. -
formatDateUTC()
Returns a formatted date in UTC. -
formatNumber()
Returns a formatted number with the default number format. -
formatPercent()
Returns a formatted percentage number based on the default percentage format. -
formatTime()
Returns a formatted time. -
formatTimeUTC()
Returns a formatted time in UTC. -
getDateStringBasedOnTimezone
Gets a date string based on a time zone. -
getDaysInDuration()
Returns the number of days in a duration. -
getDefaultCurrencyFormat()
Returns the default currency format. -
getDefaultNumberFormat()
Returns the default NumberFormat object. -
getDefaultPercentFormat()
Returns the default percentage format. -
getHoursInDuration()
Returns a length of time in hours. -
getLocalizedDateTimeLabels()
Deprecated. Do not use. Returns date time labels, such as month name, weekday name. -
getMillisecondsInDuration()
Returns the number of milliseconds in a duration. -
getMinutesInDuration()
Returns the number of minutes in a duration. -
getMonthsInDuration()
Returns the number of months in a duration. -
getNumberFormat()
Returns a NumberFormat object. -
getSecondsInDuration()
Returns the number of seconds in a duration. -
getToday
Gets today’s date based on a time zone. -
getYearsInDuration()
Returns the number of years in a duration. -
isAfter()
Checks if date1 is after date2. -
isBefore()
Checks if date1 is before date2. -
isBetween()
Checks if date is between fromDate and toDate, where the match is inclusive. -
isPeriodTimeView()
Deprecated. Do not use. Checks if a datetime pattern string uses a 24-hour or 12-hour time view. -
isSame()
Checks if date1 is the same as date2. -
parseDateTime()
Parses a string and returns a JavaScript Date. -
parseDateTimeISO8601()
Parses a date time string in an ISO-8601 format and returns a JavaScript Date. -
parseDateTimeUTC()
Parses a string and returns a JavaScript Date. -
startOf()
Returns a date that is the start of a unit of time for the given date. -
toISOString()
Deprecated. Use Date.toISOString() instead. -
translateFromLocalizedDigits()
Translate the localized digit string to a string with Arabic digits, if there is any. -
translateFromOtherCalendar()
Translates the input date from another calendar system (for example, the Buddhist calendar) to the Gregorian calendar based on the locale. -
translateToLocalizedDigits()
Translate the input string to a string with localized digits, if there is any. -
translateToOtherCalendar()
Translates the input date to a date in another calendar system (for example, the Buddhist calendar) based on the locale.