@@ -524,12 +524,12 @@ describe('CalendarDate manipulation', function () {
524524
525525 it ( 'should constrain month' , function ( ) {
526526 let date = new CalendarDate ( 2020 , 2 , 3 ) ;
527- expect ( date . set ( { month : 13 } ) ) . toEqual ( new CalendarDate ( 2020 , 12 , 3 ) ) ;
527+ expect ( date . set ( { month : 13 } , true ) ) . toEqual ( new CalendarDate ( 2020 , 12 , 3 ) ) ;
528528 } ) ;
529529
530530 it ( 'should set month and constrain day' , function ( ) {
531531 let date = new CalendarDate ( 2020 , 8 , 31 ) ;
532- expect ( date . set ( { month : 9 } ) ) . toEqual ( new CalendarDate ( 2020 , 9 , 30 ) ) ;
532+ expect ( date . set ( { month : 9 } , true ) ) . toEqual ( new CalendarDate ( 2020 , 9 , 30 ) ) ;
533533 } ) ;
534534
535535 it ( 'should set day' , function ( ) {
@@ -539,12 +539,12 @@ describe('CalendarDate manipulation', function () {
539539
540540 it ( 'should constrain day' , function ( ) {
541541 let date = new CalendarDate ( 2020 , 9 , 3 ) ;
542- expect ( date . set ( { day : 31 } ) ) . toEqual ( new CalendarDate ( 2020 , 9 , 30 ) ) ;
542+ expect ( date . set ( { day : 31 } , true ) ) . toEqual ( new CalendarDate ( 2020 , 9 , 30 ) ) ;
543543 } ) ;
544544
545545 it ( 'should constrain day on leap years' , function ( ) {
546546 let date = new CalendarDate ( 2020 , 2 , 3 ) ;
547- expect ( date . set ( { day : 31 } ) ) . toEqual ( new CalendarDate ( 2020 , 2 , 29 ) ) ;
547+ expect ( date . set ( { day : 31 } , true ) ) . toEqual ( new CalendarDate ( 2020 , 2 , 29 ) ) ;
548548
549549 date = new CalendarDate ( 2019 , 2 , 3 ) ;
550550 expect ( date . set ( { day : 31 } ) ) . toEqual ( new CalendarDate ( 2019 , 2 , 28 ) ) ;
@@ -553,7 +553,7 @@ describe('CalendarDate manipulation', function () {
553553 describe ( 'Japanese calendar' , function ( ) {
554554 it ( 'should constrain date in era' , function ( ) {
555555 let date = new CalendarDate ( new JapaneseCalendar ( ) , 'heisei' , 30 , 4 , 30 ) ;
556- expect ( date . set ( { year : 35 } ) ) . toEqual ( new CalendarDate ( new JapaneseCalendar ( ) , 'heisei' , 31 , 4 , 30 ) ) ;
556+ expect ( date . set ( { year : 35 } , true ) ) . toEqual ( new CalendarDate ( new JapaneseCalendar ( ) , 'heisei' , 31 , 4 , 30 ) ) ;
557557
558558 date = new CalendarDate ( new JapaneseCalendar ( ) , 'showa' , 63 , 1 , 6 ) ;
559559 expect ( date . set ( { year : 72 } ) ) . toEqual ( new CalendarDate ( new JapaneseCalendar ( ) , 'showa' , 64 , 1 , 6 ) ) ;
@@ -578,7 +578,7 @@ describe('CalendarDate manipulation', function () {
578578 describe ( 'Taiwan calendar' , function ( ) {
579579 it ( 'should constrain year in era' , function ( ) {
580580 let date = new CalendarDate ( new TaiwanCalendar ( ) , 'before_minguo' , 5 , 4 , 30 ) ;
581- expect ( date . set ( { year : - 2 } ) ) . toEqual ( new CalendarDate ( new TaiwanCalendar ( ) , 'before_minguo' , 1 , 4 , 30 ) ) ;
581+ expect ( date . set ( { year : - 2 } , true ) ) . toEqual ( new CalendarDate ( new TaiwanCalendar ( ) , 'before_minguo' , 1 , 4 , 30 ) ) ;
582582 } ) ;
583583 } ) ;
584584 } ) ;
0 commit comments