projects/lib/src/date-time-provider.ts
Methods |
Abstract new |
new()
|
Defined in projects/lib/src/date-time-provider.ts:5
|
Returns :
Date
|
Abstract now |
now()
|
Defined in projects/lib/src/date-time-provider.ts:4
|
Returns :
number
|
import { Injectable } from '@angular/core';
export abstract class DateTimeProvider {
abstract now(): number;
abstract new(): Date;
}
@Injectable()
export class SystemDateTimeProvider extends DateTimeProvider {
now(): number {
return Date.now();
}
new(): Date {
return new Date();
}
}