File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/@internationalized/date/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -375,14 +375,14 @@ export class ZonedDateTime {
375375 /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
376376 set ( fields : DateFields & TimeFields , disambiguation ?: Disambiguation ) : ZonedDateTime ;
377377 set ( fields : DateFields & TimeFields , constrainDay ?: boolean ) : ZonedDateTime ;
378- set ( ... args : any [ ] ) {
378+ set ( fields : DateFields & TimeFields , value ?: Disambiguation | boolean ) {
379379 let disambiguation , constrainDay = false ;
380- if ( args [ 1 ] && typeof args [ 1 ] === 'string' ) {
381- disambiguation = args [ 1 ] ;
382- } else if ( args [ 1 ] && typeof args [ 1 ] === 'boolean' ) {
383- constrainDay = args [ 1 ] ;
380+ if ( value && typeof value === 'string' ) {
381+ disambiguation = value ;
382+ } else if ( value && typeof value === 'boolean' ) {
383+ constrainDay = value ;
384384 }
385- return setZoned ( this , args [ 0 ] , disambiguation , constrainDay ) ;
385+ return setZoned ( this , fields , disambiguation , constrainDay ) ;
386386 }
387387
388388
You can’t perform that action at this time.
0 commit comments