This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Temporal } from 'temporal' | |
| const TemporalDateUtils = ( datelike: string | Date ) => { | |
| const date = typeof datelike === 'string' ? new Date( datelike ) : datelike | |
| const datelikeString = typeof datelike === 'string' ? datelike : date.toISOString() | |
| const instant = Temporal.Instant.from( date.toISOString() ) | |
| const plainDateString = instant.toString().split( 'T' )[ 0 ] | |
| const timeIncluded = /T\d+/.test( datelikeString ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @supports (display: grid) {} |
NewerOlder