Skip to content

DateTransformer

A transformer that can transform Date to an ISO string and back.

Import:

import { DateTransformer } from 'obsidian-dev-utils/transformers/date-transformer';

Signature:

export class DateTransformer extends TypedTransformer<Date, string>

Extends: TypedTransformer<Date, string>

Methods

MethodReturnsDescription
canTransform(value)value is DateDetermines if the value is a Date.
canTransform(value, key)value is DateDetermines if the transformer can transform the given value.
(Inherited from TypedTransformer)
restoreValue(transformedValue)DateRestores the value from a string.
restoreValue(transformedValue, key)DateRestores the given value.
(Inherited from TypedTransformer)
transformValue(value)stringTransforms the value to a string.
transformValue(value, key)stringTransforms the given value.
(Inherited from TypedTransformer)