MCPcopy Index your code
hub / github.com/MALSync/MALSync / getDateTimeRangeText

Method getDateTimeRangeText

src/utils/IntlWrapper.ts:190–202  ·  view source on GitHub ↗
(style: Intl.DateTimeFormatOptions = { dateStyle: 'medium' })

Source from the content-addressed store, hash-verified

188 }
189
190 getDateTimeRangeText(style: Intl.DateTimeFormatOptions = { dateStyle: 'medium' }) {
191 const validFrom = this.from.isValidDate();
192 const validTo = this.to.isValidDate();
193 if (!validFrom || !validTo) {
194 const from = validFrom ? this.from.getDateTimeText(style) : '?';
195 const to = validTo ? this.to.getDateTimeText(style) : '?';
196 return `${from} - ${to}`;
197 }
198 return new Intl.DateTimeFormat(this.locale, style).formatRange(
199 this.from.getDate(),
200 this.to.getDate(),
201 );
202 }
203}
204
205export class IntlDateTime {

Callers 3

infoMethod · 0.80
infoMethod · 0.80

Calls 3

isValidDateMethod · 0.80
getDateTimeTextMethod · 0.80
getDateMethod · 0.80

Tested by

no test coverage detected