src/lib/core/dl-date-adapter-number.ts
Adapts number
to be usable as a date by date/time components that work with dates.
No op adapter.
Methods |
fromMilliseconds | ||||||||
fromMilliseconds(milliseconds: number)
|
||||||||
Inherited from
DlDateAdapter
|
||||||||
Defined in
DlDateAdapter:15
|
||||||||
Returns the specified number. a moment time time. the specified moment in time.
Parameters :
Returns :
number
the specified moment in time. |
toMilliseconds | ||||||||
toMilliseconds(value: number | null)
|
||||||||
Inherited from
DlDateAdapter
|
||||||||
Defined in
DlDateAdapter:26
|
||||||||
Returns the specified number.
a moment time time or
Parameters :
Returns :
number | null
the specified moment in time or |
import {DlDateAdapter} from './dl-date-adapter';
/**
* Adapts `number` to be usable as a date by date/time components that work with dates.
* No op adapter.
**/
export class DlDateAdapterNumber extends DlDateAdapter<number> {
/**
* Returns the specified number.
* @param milliseconds
* a moment time time.
* @returns
* the specified moment in time.
*/
fromMilliseconds(milliseconds: number): number {
return milliseconds;
}
/**
* Returns the specified number.
* @param value
* a moment time time or `null`
* @returns
* the specified moment in time or `null`
*/
toMilliseconds(value: number | null): number | null {
return value;
}
}