diff --git a/static/directives/repo-tag-history.html b/static/directives/repo-tag-history.html index 5c9a46da2..baf651650 100644 --- a/static/directives/repo-tag-history.html +++ b/static/directives/repo-tag-history.html @@ -26,7 +26,7 @@ - {{ entry.date | amDateFormat:'dddd, MMMM Do YYYY' }} + diff --git a/static/js/directives/ui/time-display/time-display.component.html b/static/js/directives/ui/time-display/time-display.component.html index d209651d4..b88a23910 100644 --- a/static/js/directives/ui/time-display/time-display.component.html +++ b/static/js/directives/ui/time-display/time-display.component.html @@ -1 +1 @@ -{{ ::$ctrl.datetime | amDateFormat:'dddd, MMMM Do YYYY, h:mm A' }} \ No newline at end of file +{{ ::$ctrl.datetime | amDateFormat:$ctrl.getFormat($ctrl.dateOnly) }} \ No newline at end of file diff --git a/static/js/directives/ui/time-display/time-display.component.ts b/static/js/directives/ui/time-display/time-display.component.ts index f3c513532..68dacf388 100644 --- a/static/js/directives/ui/time-display/time-display.component.ts +++ b/static/js/directives/ui/time-display/time-display.component.ts @@ -9,4 +9,13 @@ import { Input, Component } from 'ng-metadata/core'; }) export class TimeDisplayComponent { @Input('<') public datetime: any; + @Input('<') public dateOnly: boolean; + + private getFormat(dateOnly: boolean): string { + if (dateOnly) { + return 'dddd, MMMM Do YYYY'; + } + + return 'dddd, MMMM Do YYYY, h:mm A'; + } }