Skip to content

Documentation / jalali-js / toStorageValue

Function: toStorageValue()

toStorageValue(date, format?): StorageValue

Defined in: storage-value.ts:113

Converts a calendar date to a plain storage value, defaulting to a Gregorian, calendar- agnostic representation (see architecture.md). The shape follows the date's precision tier; see the ValueFormat doc comment for what each format means.

Parameters

date

AnyCalendarDate

format?

ValueFormat = 'gregorian-iso'

Returns

StorageValue