Partager via


LocaleInfo interface

Represents OS locale info used for formatting date and time data

Properties

longDate

Displays only date values, as specified by the Long Date format in user's regional settings.

Example

Friday, April 21, 2023
longTime

A string representing the long time format used by the user's locale.

Example

10:10:42 AM
platform

Represents the user's platform on which the app is running.

regionalFormat

Represents the regional format used by the user's locale.

Example

en-us.

shortDate

Displays date values, as specified by the short date format MM/DD/YYYY in user's regional settings.

Example

4/21/2023 or 4-21-2023
shortTime

A string representing the short time format used by the user's locale.

Example

10:10

Property Details

longDate

Displays only date values, as specified by the Long Date format in user's regional settings.

Example

Friday, April 21, 2023
longDate: string

Property Value

string

longTime

A string representing the long time format used by the user's locale.

Example

10:10:42 AM
longTime: string

Property Value

string

platform

Represents the user's platform on which the app is running.

platform: android | ios | macos | "windows"

Property Value

android | ios | macos | "windows"

regionalFormat

Represents the regional format used by the user's locale.

Example

en-us.

regionalFormat: string

Property Value

string

shortDate

Displays date values, as specified by the short date format MM/DD/YYYY in user's regional settings.

Example

4/21/2023 or 4-21-2023
shortDate: string

Property Value

string

shortTime

A string representing the short time format used by the user's locale.

Example

10:10
shortTime: string

Property Value

string