On this page
getLocaleTimeFormat
function experimental
| npm Package | @angular/common | 
|---|---|
| Module | import { getLocaleTimeFormat } from '@angular/common'; | 
     
| Source | common/src/i18n/locale_data_api.ts | 
function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
  Description
Time format that depends on the locale.
The standard formats include four basic time formats:
fullshould contain hour (h/H), minute (mm), second (ss), and zone (zzzz).longshould contain hour, minute, second, and zone (z)mediumshould contain hour, minute, second.shortshould contain hour, minute.
Note: The patterns depend on whether the main country using your language uses 12-hour time or not:
- For 12-hour time, use a pattern like 
hh:mm ausing h to mean a 12-hour clock cycle running 1 through 12 (midnight plus 1 minute is 12:01), or using K to mean a 12-hour clock cycle running 0 through 11 (midnight plus 1 minute is 0:01). - For 24-hour time, use a pattern like 
HH:mmusing H to mean a 24-hour clock cycle running 0 through 23 (midnight plus 1 minute is 0:01), or using k to mean a 24-hour clock cycle running 1 through 24 (midnight plus 1 minute is 24:01). 
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
 https://v5.angular.io/api/common/getLocaleTimeFormat