DateTransformer
A transformer that can transform Date to an ISO string and back.
Import:
import { DateTransformer } from '@mnaoumov/typescript-lib/transformers/date-transformer';Signature:
export class DateTransformer extends TypedTransformer<Date, string>Extends: TypedTransformer<Date, string>
Methods
| Method | Returns | Description |
|---|---|---|
| canTransform(value) | value is Date | Determines if the value is a Date. |
| canTransform(value, key) | value is Date | Determines if the transformer can transform the given value. (Inherited from TypedTransformer) |
| getTransformer(transformerId) | Transformer | Gets the transformer with the given id. (Inherited from TypedTransformer) |
| getTransformerId(value, key) | null | string | Gets the id of the transformer that can transform the given value. (Inherited from TypedTransformer) |
| restoreValue(transformedValue) | Date | Restores the value from a string. |
| restoreValue(transformedValue, key) | Date | Restores the given value. (Inherited from TypedTransformer) |
| restoreValue(transformedValue, key) | unknown | Restores the given value. (Inherited from TypedTransformer) |
| transformObjectRecursively(value) | GenericObject | Transforms the given object recursively. (Inherited from TypedTransformer) |
| transformValue(value) | string | Transforms the value to a string. |
| transformValue(value, key) | string | Transforms the given value. (Inherited from TypedTransformer) |
| transformValue(value, key) | unknown | Transforms the given value. (Inherited from TypedTransformer) |