- legen-entry.component: any action via buttons

- Moment.Pipe insider core/time module
- dataset.service.ts: init initial timespan with current week timestamps
This commit is contained in:
Arno Kaimbacher 2021-10-25 16:30:50 +02:00
parent d6abaa0d6d
commit 799d08bd0b
11 changed files with 97 additions and 51 deletions

View file

@ -1,8 +1,10 @@
import * as moment from "moment";
export abstract class TimeInterval {
}
export class Timespan extends TimeInterval{
export class Timespan extends TimeInterval {
public from: number;
@ -13,6 +15,14 @@ export class Timespan extends TimeInterval{
this.from = from instanceof Date ? from.valueOf() : from;
this.to = to ? (to instanceof Date ? to.valueOf() : to) : this.from;
}
get fromDate(): string {
return moment(this.from).format('DD.MM.YYYY h:mm');
}
get toDate(): string {
return moment(this.to).format('DD.MM.YYYY h:mm');
}
}
export class BufferedTime extends TimeInterval {