Switch time display components to use locale-aware format strings

This commit is contained in:
Joseph Schorr 2017-11-27 16:03:54 +02:00
parent db53f82a34
commit 49dff5729c
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
<span> <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 am-time-ago="::$ctrl.datetime"></span>
</span> </span>
<span ng-if="::!$ctrl.datetime">Unknown</span> <span ng-if="::!$ctrl.datetime">Unknown</span>

View file

@ -13,9 +13,9 @@ export class TimeDisplayComponent {
private getFormat(dateOnly: boolean): string { private getFormat(dateOnly: boolean): string {
if (dateOnly) { if (dateOnly) {
return 'ddd, MMM Do YYYY'; return 'll';
} }
return 'ddd, MMM Do YYYY, h:mm A'; return 'llll';
} }
} }