src/app/shared/models/period.ts
Properties |
Methods |
constructor(from: number, to: number)
|
Defined in src/app/shared/models/period.ts:1
|
toStartAndEndOfDay |
toStartAndEndOfDay()
|
Defined in src/app/shared/models/period.ts:6
|
Returns :
Period
|
Public from |
from:
|
Type : number
|
Defined in src/app/shared/models/period.ts:3
|
Public to |
to:
|
Type : number
|
Defined in src/app/shared/models/period.ts:3
|
export class Period {
constructor(public from: number, public to: number) {
}
toStartAndEndOfDay(): Period {
let from = new Date(this.from).setHours(0, 0, 0, 0);
let to = new Date(this.to).setHours(23, 59, 59, 999);
return new Period(from, to)
}
}