Switch time display components to use locale-aware format strings
This commit is contained in:
parent
db53f82a34
commit
49dff5729c
2 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<span>
|
||||
<span ng-if="::$ctrl.datetime" data-title="{{ ::$ctrl.datetime | amDateFormat:'dddd, MMMM Do YYYY, h:mm:ss a' }}" bs-tooltip>
|
||||
<span ng-if="::$ctrl.datetime" data-title="{{ ::$ctrl.datetime | amDateFormat:'llll' }}" bs-tooltip>
|
||||
<span am-time-ago="::$ctrl.datetime"></span>
|
||||
</span>
|
||||
<span ng-if="::!$ctrl.datetime">Unknown</span>
|
||||
|
|
|
@ -13,9 +13,9 @@ export class TimeDisplayComponent {
|
|||
|
||||
private getFormat(dateOnly: boolean): string {
|
||||
if (dateOnly) {
|
||||
return 'ddd, MMM Do YYYY';
|
||||
return 'll';
|
||||
}
|
||||
|
||||
return 'ddd, MMM Do YYYY, h:mm A';
|
||||
return 'llll';
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue