This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/ui/time-display/time-display.component.ts

22 lines
474 B
TypeScript
Raw Normal View History

2019-11-12 16:09:47 +00:00
import { Input, Component } from 'ng-metadata/core';
/**
* A component that displays when an event occurred.
*/
@Component({
selector: 'timeDisplay',
templateUrl: '/static/js/directives/ui/time-display/time-display.component.html'
})
export class TimeDisplayComponent {
@Input('<') public datetime: any;
@Input('<') public dateOnly: boolean;
private getFormat(dateOnly: boolean): string {
if (dateOnly) {
return 'll';
}
return 'llll';
}
}