MOBILE-2795 calendar: Fix calendar dates

main
Pau Ferrer Ocaña 2019-01-10 17:13:03 +01:00
parent fee1dde1dc
commit db63685fcc
3 changed files with 4 additions and 3 deletions

View File

@ -16,11 +16,11 @@
</ion-card-title>
<ion-item text-wrap>
<h2>{{ 'addon.calendar.eventstarttime' | translate}}</h2>
<p>{{ event.timestart | coreToLocaleString }}</p>
<p>{{ event.timestart * 1000 | coreFormatDate }}</p>
</ion-item>
<ion-item text-wrap *ngIf="event.timeduration > 0">
<h2>{{ 'addon.calendar.eventendtime' | translate}}</h2>
<p>{{ (event.timestart + event.timeduration) |  coreToLocaleString }}</p>
<p>{{ (event.timestart + event.timeduration) * 1000 | coreFormatDate }}</p>
</ion-item>
<a ion-item text-wrap *ngIf="courseName" [href]="courseUrl" core-link capture="true">
<h2>{{ 'core.course' | translate}}</h2>

View File

@ -32,7 +32,7 @@
<p>
{{ event.timestart * 1000 | coreFormatDate: "strftimetime" }}
<span *ngIf="event.timeduration && event.endsSameDay"> - {{ (event.timestart + event.timeduration) * 1000 | coreFormatDate: "strftimetime" }}</span>
<span *ngIf="event.timeduration && !event.endsSameDay"> - {{ (event.timestart + event.timeduration) | coreToLocaleString }}</span>
<span *ngIf="event.timeduration && !event.endsSameDay"> - {{ (event.timestart + event.timeduration) * 1000 | coreFormatDate: "strftimedatetimeshort" }}</span>
</p>
</a>
</ng-container>

View File

@ -17,6 +17,7 @@ import { CoreLoggerProvider } from '@providers/logger';
/**
* Filter to format a timestamp to a locale string. Timestamp can be in seconds or milliseconds.
* @deprecated since 3.6. Use coreFormatDate instead.
*/
@Pipe({
name: 'coreToLocaleString',