MCPcopy Index your code
hub / github.com/github/relative-time-element / format

Method format

src/relative-time-element.ts:540–548  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

538 }
539
540 get format(): Format {
541 const format = this.getAttribute('format')
542 if (format === 'datetime') return 'datetime'
543 if (format === 'relative') return 'relative'
544 if (format === 'duration') return 'duration'
545 if (format === 'micro') return 'micro'
546 if (format === 'elapsed') return 'elapsed'
547 return 'auto'
548 }
549
550 set format(value: Format) {
551 this.setAttribute('format', value)

Callers 7

#getFormattedTitleMethod · 0.45
#getRelativeFormatMethod · 0.45
#getDateTimeFormatMethod · 0.45
#isTodayMethod · 0.45
#isCurrentYearMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected