mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
parent
3d216fab07
commit
986496786a
@ -28,10 +28,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<div class="details-main">
|
<div class="details-main">
|
||||||
{{ media.metadata.creationDate | date: (isThisYear() ? 'MMMM d' : 'longDate')}}
|
{{ media.metadata.creationDate | date: (isThisYear() ? 'MMMM d' : 'longDate') : 'UTC' }}
|
||||||
</div>
|
</div>
|
||||||
<div class="details-sub row">
|
<div class="details-sub row">
|
||||||
<div class="col-12">{{ media.metadata.creationDate | date :'EEEE'}}, {{getTime()}}</div>
|
<div class="col-12">{{ media.metadata.creationDate | date : 'EEEE, HH:mm:ss' : 'UTC' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -150,15 +150,10 @@ export class InfoPanelLightboxComponent implements OnInit, OnChanges {
|
|||||||
isThisYear(): boolean {
|
isThisYear(): boolean {
|
||||||
return (
|
return (
|
||||||
new Date().getFullYear() ===
|
new Date().getFullYear() ===
|
||||||
new Date(this.media.metadata.creationDate).getFullYear()
|
new Date(this.media.metadata.creationDate).getUTCFullYear()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getTime(): string {
|
|
||||||
const date = new Date(this.media.metadata.creationDate);
|
|
||||||
return date.toTimeString().split(' ')[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
toFraction(f: number): string | number {
|
toFraction(f: number): string | number {
|
||||||
if (f > 1) {
|
if (f > 1) {
|
||||||
return f;
|
return f;
|
||||||
|
Loading…
Reference in New Issue
Block a user