Method
constructor
(
from: Date | number | string,
to: Date | number | string,
locale: Intl.LocalesArgument = api.storage.lang('locale'),
)
Source from the content-addressed store, hash-verified
| 177 | protected locale: Intl.LocalesArgument; |
| 178 | |
| 179 | constructor( |
| 180 | from: Date | number | string, |
| 181 | to: Date | number | string, |
| 182 | locale: Intl.LocalesArgument = api.storage.lang('locale'), |
| 183 | ) { |
| 184 | this.from = new IntlDateTime(from); |
| 185 | this.to = new IntlDateTime(to); |
| 186 | this.locale = locale; |
| 187 | return this; |
| 188 | } |
| 189 | |
| 190 | getDateTimeRangeText(style: Intl.DateTimeFormatOptions = { dateStyle: 'medium' }) { |
| 191 | const validFrom = this.from.isValidDate(); |
Callers
nothing calls this directly
Tested by
no test coverage detected