File

core/common/date-format.service.ts

Index

Methods

Constructor

constructor(appStateService: AppStateService)
Parameters :
Name Type Optional
appStateService AppStateService No

Methods

getDateFormat
getDateFormat(formattingOptions?: DateFormatOptions)

Returns date format pattern based on locale and formatting syntax.

Parameters :
Name Type Optional Description
formattingOptions DateFormatOptions Yes
  • Object containing formatting options
Returns : string

A string containing the date format pattern for the specified locale

shouldUseMeridianFormat
shouldUseMeridianFormat(locale)

Determines whether a given locale should use 12-hour clock format with AM/PM.

Parameters :
Name Optional Default value Description
locale No this.appStateService.state.lang
  • The locale code (e.g., 'en', 'pl', 'en_US')
Returns : boolean

boolean indicating whether meridian format (AM/PM) should be used

results matching ""

    No results matching ""