File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import { describe , expect , test } from 'vitest' ;
2- import { isValidDate } from '../isValidDate' ;
1+ import { describe , expect , test } from 'vitest'
2+ import { isValidDate } from '../isValidDate'
33
44describe ( 'isValidDate' , ( ) => {
55 test ( 'should return true for a valid date' , ( ) => {
6- expect ( isValidDate ( new Date ( ) ) ) . toBe ( true ) ;
6+ expect ( isValidDate ( new Date ( ) ) ) . toBe ( true )
77 } )
88
99 test ( 'should return false for an invalid date' , ( ) => {
10- expect ( isValidDate ( new Date ( " invalid" ) ) ) . toBe ( false ) ;
11- } ) ;
10+ expect ( isValidDate ( new Date ( ' invalid' ) ) ) . toBe ( false )
11+ } )
1212
13- test ( " should return false for null" , ( ) => {
14- expect ( isValidDate ( null ) ) . toBe ( false ) ;
15- } ) ;
16- } ) ;
13+ test ( ' should return false for null' , ( ) => {
14+ expect ( isValidDate ( null ) ) . toBe ( false )
15+ } )
16+ } )
Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ export interface TimeFormatterOptions extends LocaleFormatterOptions {
4141}
4242
4343export interface DateTimeFormatterOptions
44- extends DateFormatterOptions ,
45- TimeFormatterOptions { }
44+ extends DateFormatterOptions , TimeFormatterOptions { }
4645
4746export interface DateFormatterBuildParams {
4847 locale ?: Locale
Original file line number Diff line number Diff line change 1- import type { WeekInfo } from " ./types" ;
1+ import type { WeekInfo } from ' ./types'
22
33const normalizeLocale = ( loc : string ) => {
44 const [ lang , region ] = loc . split ( '-' )
5- return region ? `${ lang ?. toLowerCase ( ) } -${ region . toUpperCase ( ) } ` : lang ?. toLowerCase ( )
5+ return region
6+ ? `${ lang ?. toLowerCase ( ) } -${ region . toUpperCase ( ) } `
7+ : lang ?. toLowerCase ( )
68}
79
810; ( function ( ) {
9- if ( 'weekInfo' in Intl . Locale . prototype && typeof Intl . Locale . prototype . getWeekInfo !== 'function' ) {
11+ if (
12+ 'weekInfo' in Intl . Locale . prototype &&
13+ typeof Intl . Locale . prototype . getWeekInfo !== 'function'
14+ ) {
1015 Intl . Locale . prototype . getWeekInfo = function ( ) {
1116 return this . weekInfo
1217 }
@@ -26,13 +31,13 @@ const normalizeLocale = (loc: string) => {
2631 }
2732
2833 if ( ! match ) {
29- match = Object . entries ( weekInfoData ) . find ( ( [ key ] ) =>
30- normalizeLocale ( key ) === normalizedLocale
34+ match = Object . entries ( weekInfoData ) . find (
35+ ( [ key ] ) => normalizeLocale ( key ) === normalizedLocale ,
3136 ) ?. [ 1 ]
3237 }
3338
3439 return match
3540 }
3641 } )
3742 }
38- } ) ( )
43+ } ) ( )
You can’t perform that action at this time.
0 commit comments