Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Apr 18, 2023
1 parent 9c27b02 commit 243b15a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/duration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import DurationFormat from './duration-format-ponyfill.js'
import type {DurationFormatOptions} from './duration-format-ponyfill.js'
const durationRe = /^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/
export const unitNames = ['year', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'] as const
export type Unit = typeof unitNames[number]
export type Unit = (typeof unitNames)[number]

export const isDuration = (str: string) => durationRe.test(str)
type Sign = -1 | 0 | 1
Expand Down
2 changes: 1 addition & 1 deletion src/relative-time-element.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Duration, elapsedTime, getRelativeTimeUnit, isDuration, roundToSingleUnit, Unit, unitNames} from './duration.js'
const HTMLElement = globalThis.HTMLElement || (null as unknown as typeof window['HTMLElement'])
const HTMLElement = globalThis.HTMLElement || (null as unknown as (typeof window)['HTMLElement'])

export type DeprecatedFormat = 'auto' | 'micro' | 'elapsed'
export type ResolvedFormat = 'duration' | 'relative' | 'datetime'
Expand Down

0 comments on commit 243b15a

Please sign in to comment.