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

ts
Friday, April 21, 2023
longTime

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

Example

ts
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

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

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

Example

ts
10:10

Property Details

longDate

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

Example

ts
Friday, April 21, 2023
TypeScript
longDate: string

Property Value

string

longTime

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

Example

ts
10:10:42 AM
TypeScript
longTime: string

Property Value

string

platform

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

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

TypeScript
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

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

Property Value

string

shortTime

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

Example

ts
10:10
TypeScript
shortTime: string

Property Value

string