@@ -295,7 +295,7 @@ mod tests {
295295
296296 // just before start time (8:59:59)
297297 let before_start = DateTime :: from_naive_utc_and_offset (
298- chrono :: NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
298+ NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
299299 . unwrap ( )
300300 . and_hms_opt ( 8 , 59 , 59 )
301301 . unwrap ( ) ,
@@ -305,7 +305,7 @@ mod tests {
305305
306306 // just after start time (9:00:01)
307307 let after_start = DateTime :: from_naive_utc_and_offset (
308- chrono :: NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
308+ NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
309309 . unwrap ( )
310310 . and_hms_opt ( 9 , 0 , 1 )
311311 . unwrap ( ) ,
@@ -315,7 +315,7 @@ mod tests {
315315
316316 // in the middle (13:00:00)
317317 let middle = DateTime :: from_naive_utc_and_offset (
318- chrono :: NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
318+ NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
319319 . unwrap ( )
320320 . and_hms_opt ( 13 , 0 , 0 )
321321 . unwrap ( ) ,
@@ -325,7 +325,7 @@ mod tests {
325325
326326 // just before end time (16:59:59)
327327 let before_end = DateTime :: from_naive_utc_and_offset (
328- chrono :: NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
328+ NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
329329 . unwrap ( )
330330 . and_hms_opt ( 16 , 59 , 59 )
331331 . unwrap ( ) ,
@@ -335,7 +335,7 @@ mod tests {
335335
336336 // at end time (17:00:00) - we expect false at exactly the end time (non-inclusive)
337337 let at_end = DateTime :: from_naive_utc_and_offset (
338- chrono :: NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
338+ NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
339339 . unwrap ( )
340340 . and_hms_opt ( 17 , 0 , 0 )
341341 . unwrap ( ) ,
@@ -345,7 +345,7 @@ mod tests {
345345
346346 // after end time (17:00:01)
347347 let after_end = DateTime :: from_naive_utc_and_offset (
348- chrono :: NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
348+ NaiveDate :: from_ymd_opt ( 2024 , 1 , 1 )
349349 . unwrap ( )
350350 . and_hms_opt ( 17 , 0 , 1 )
351351 . unwrap ( ) ,
@@ -385,7 +385,7 @@ mod tests {
385385
386386 // 4PM UTC is 5PM London time, so already out of session
387387 let at_end = DateTime :: from_naive_utc_and_offset (
388- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
388+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
389389 . unwrap ( )
390390 . and_hms_opt ( 16 , 0 , 0 )
391391 . unwrap ( ) ,
@@ -405,7 +405,7 @@ mod tests {
405405 } ;
406406
407407 let before_start = DateTime :: from_naive_utc_and_offset (
408- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
408+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
409409 . unwrap ( )
410410 . and_hms_opt ( 7 , 59 , 59 )
411411 . unwrap ( ) ,
@@ -414,7 +414,7 @@ mod tests {
414414 assert ! ( !schedule_1. is_active_at( & before_start) ) ;
415415
416416 let at_start = DateTime :: from_naive_utc_and_offset (
417- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
417+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
418418 . unwrap ( )
419419 . and_hms_opt ( 8 , 0 , 0 )
420420 . unwrap ( ) ,
@@ -423,7 +423,7 @@ mod tests {
423423 assert ! ( schedule_1. is_active_at( & at_start) ) ;
424424
425425 let before_end = DateTime :: from_naive_utc_and_offset (
426- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
426+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
427427 . unwrap ( )
428428 . and_hms_opt ( 0 , 59 , 59 )
429429 . unwrap ( ) ,
@@ -432,7 +432,7 @@ mod tests {
432432 assert ! ( schedule_1. is_active_at( & before_end) ) ;
433433
434434 let at_end = DateTime :: from_naive_utc_and_offset (
435- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
435+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
436436 . unwrap ( )
437437 . and_hms_opt ( 1 , 0 , 0 )
438438 . unwrap ( ) ,
@@ -452,7 +452,7 @@ mod tests {
452452 } ;
453453
454454 let before_start = DateTime :: from_naive_utc_and_offset (
455- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
455+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
456456 . unwrap ( )
457457 . and_hms_opt ( 7 , 59 , 59 )
458458 . unwrap ( ) ,
@@ -461,7 +461,7 @@ mod tests {
461461 assert ! ( !schedule_1. is_active_at( & before_start) ) ;
462462
463463 let at_start = DateTime :: from_naive_utc_and_offset (
464- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
464+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
465465 . unwrap ( )
466466 . and_hms_opt ( 8 , 0 , 0 )
467467 . unwrap ( ) ,
@@ -470,7 +470,7 @@ mod tests {
470470 assert ! ( schedule_1. is_active_at( & at_start) ) ;
471471
472472 let before_end = DateTime :: from_naive_utc_and_offset (
473- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
473+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
474474 . unwrap ( )
475475 . and_hms_opt ( 23 , 29 , 59 )
476476 . unwrap ( ) ,
@@ -479,7 +479,7 @@ mod tests {
479479 assert ! ( schedule_1. is_active_at( & before_end) ) ;
480480
481481 let at_end = DateTime :: from_naive_utc_and_offset (
482- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
482+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 27 )
483483 . unwrap ( )
484484 . and_hms_opt ( 23 , 30 , 0 )
485485 . unwrap ( ) ,
@@ -506,7 +506,7 @@ mod tests {
506506
507507 // Monday 8:59:59 - before start time
508508 let monday_before_start = DateTime :: from_naive_utc_and_offset (
509- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
509+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
510510 . unwrap ( )
511511 . and_hms_opt ( 8 , 59 , 59 )
512512 . unwrap ( ) ,
@@ -516,7 +516,7 @@ mod tests {
516516
517517 // Monday 9:00:01 - after start time
518518 let monday_after_start = DateTime :: from_naive_utc_and_offset (
519- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
519+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
520520 . unwrap ( )
521521 . and_hms_opt ( 9 , 0 , 1 )
522522 . unwrap ( ) ,
@@ -526,7 +526,7 @@ mod tests {
526526
527527 // Friday 16:59:59 - just before end time on a valid day
528528 let friday_before_end = DateTime :: from_naive_utc_and_offset (
529- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
529+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
530530 . unwrap ( )
531531 . and_hms_opt ( 16 , 59 , 59 )
532532 . unwrap ( ) ,
@@ -536,7 +536,7 @@ mod tests {
536536
537537 // Friday 17:00:00 - at end time on a valid day (exclusive end)
538538 let friday_at_end = DateTime :: from_naive_utc_and_offset (
539- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
539+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
540540 . unwrap ( )
541541 . and_hms_opt ( 17 , 0 , 0 )
542542 . unwrap ( ) ,
@@ -546,7 +546,7 @@ mod tests {
546546
547547 // Saturday 12:00:00 - middle of day on weekend
548548 let saturday = DateTime :: from_naive_utc_and_offset (
549- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 5 ) // Saturday
549+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 5 ) // Saturday
550550 . unwrap ( )
551551 . and_hms_opt ( 12 , 0 , 0 )
552552 . unwrap ( ) ,
@@ -574,7 +574,7 @@ mod tests {
574574
575575 // Monday 7:59:59 UTC = 8:59:59 London - before start time
576576 let monday_before_start = DateTime :: from_naive_utc_and_offset (
577- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
577+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
578578 . unwrap ( )
579579 . and_hms_opt ( 7 , 59 , 59 )
580580 . unwrap ( ) ,
@@ -584,7 +584,7 @@ mod tests {
584584
585585 // Monday 8:00:01 UTC = 9:00:01 London - after start time
586586 let monday_after_start = DateTime :: from_naive_utc_and_offset (
587- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
587+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
588588 . unwrap ( )
589589 . and_hms_opt ( 8 , 0 , 1 )
590590 . unwrap ( ) ,
@@ -594,7 +594,7 @@ mod tests {
594594
595595 // Friday 15:59:59 UTC = 16:59:59 London - just before end time
596596 let friday_before_end = DateTime :: from_naive_utc_and_offset (
597- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
597+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
598598 . unwrap ( )
599599 . and_hms_opt ( 15 , 59 , 59 )
600600 . unwrap ( ) ,
@@ -604,7 +604,7 @@ mod tests {
604604
605605 // Friday 16:00:00 UTC = 17:00:00 London - at end time (exclusive)
606606 let friday_at_end = DateTime :: from_naive_utc_and_offset (
607- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
607+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
608608 . unwrap ( )
609609 . and_hms_opt ( 16 , 0 , 0 )
610610 . unwrap ( ) ,
@@ -632,7 +632,7 @@ mod tests {
632632
633633 // Monday 13:29:59 UTC = 9:29:59 NY - just before start time
634634 let monday_before_start = DateTime :: from_naive_utc_and_offset (
635- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
635+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
636636 . unwrap ( )
637637 . and_hms_opt ( 13 , 29 , 59 )
638638 . unwrap ( ) ,
@@ -642,7 +642,7 @@ mod tests {
642642
643643 // Monday 13:30:01 UTC = 9:30:01 NY - just after start time
644644 let monday_after_start = DateTime :: from_naive_utc_and_offset (
645- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
645+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
646646 . unwrap ( )
647647 . and_hms_opt ( 13 , 30 , 1 )
648648 . unwrap ( ) ,
@@ -652,7 +652,7 @@ mod tests {
652652
653653 // Tuesday 19:59:59 UTC = 15:59:59 NY - just before end time
654654 let tuesday_before_end = DateTime :: from_naive_utc_and_offset (
655- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
655+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
656656 . unwrap ( )
657657 . and_hms_opt ( 19 , 59 , 59 )
658658 . unwrap ( ) ,
@@ -662,7 +662,7 @@ mod tests {
662662
663663 // Tuesday 20:00:00 UTC = 16:00:00 NY - at end time (exclusive)
664664 let tuesday_at_end = DateTime :: from_naive_utc_and_offset (
665- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
665+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
666666 . unwrap ( )
667667 . and_hms_opt ( 20 , 0 , 0 )
668668 . unwrap ( ) ,
@@ -690,7 +690,7 @@ mod tests {
690690
691691 // Monday 11:59:59 UTC = 21:59:59 Sydney - just before start time
692692 let monday_before_start = DateTime :: from_naive_utc_and_offset (
693- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
693+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
694694 . unwrap ( )
695695 . and_hms_opt ( 11 , 59 , 59 )
696696 . unwrap ( ) ,
@@ -700,7 +700,7 @@ mod tests {
700700
701701 // Monday 12:00:01 UTC = 22:00:01 Sydney - just after start time
702702 let monday_after_start = DateTime :: from_naive_utc_and_offset (
703- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
703+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
704704 . unwrap ( )
705705 . and_hms_opt ( 12 , 0 , 1 )
706706 . unwrap ( ) ,
@@ -710,7 +710,7 @@ mod tests {
710710
711711 // Tuesday 19:59:59 UTC = 5:59:59 Sydney Wednesday - just before end time
712712 let tuesday_before_end = DateTime :: from_naive_utc_and_offset (
713- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
713+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
714714 . unwrap ( )
715715 . and_hms_opt ( 19 , 59 , 59 )
716716 . unwrap ( ) ,
@@ -720,7 +720,7 @@ mod tests {
720720
721721 // Tuesday 20:00:00 UTC = 6:00:00 Sydney Wednesday - at end time (exclusive)
722722 let tuesday_at_end = DateTime :: from_naive_utc_and_offset (
723- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
723+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
724724 . unwrap ( )
725725 . and_hms_opt ( 20 , 0 , 0 )
726726 . unwrap ( ) ,
@@ -730,7 +730,7 @@ mod tests {
730730
731731 // Wednesday 10:00:00 UTC = 20:00:00 Sydney - during inactive period
732732 let wednesday_inactive = DateTime :: from_naive_utc_and_offset (
733- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 2 ) // Wednesday
733+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 2 ) // Wednesday
734734 . unwrap ( )
735735 . and_hms_opt ( 10 , 0 , 0 )
736736 . unwrap ( ) ,
@@ -751,7 +751,7 @@ mod tests {
751751
752752 // Friday 12:00:00 - should be inactive (weekday)
753753 let friday = DateTime :: from_naive_utc_and_offset (
754- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
754+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
755755 . unwrap ( )
756756 . and_hms_opt ( 12 , 0 , 0 )
757757 . unwrap ( ) ,
@@ -761,7 +761,7 @@ mod tests {
761761
762762 // Saturday 9:59:59 - before start time on weekend
763763 let saturday_before_start = DateTime :: from_naive_utc_and_offset (
764- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 5 ) // Saturday
764+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 5 ) // Saturday
765765 . unwrap ( )
766766 . and_hms_opt ( 9 , 59 , 59 )
767767 . unwrap ( ) ,
@@ -771,7 +771,7 @@ mod tests {
771771
772772 // Saturday 10:00:01 - after start time on weekend
773773 let saturday_after_start = DateTime :: from_naive_utc_and_offset (
774- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 5 ) // Saturday
774+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 5 ) // Saturday
775775 . unwrap ( )
776776 . and_hms_opt ( 10 , 0 , 1 )
777777 . unwrap ( ) ,
@@ -781,7 +781,7 @@ mod tests {
781781
782782 // Sunday 15:59:59 - before end time on weekend
783783 let sunday_before_end = DateTime :: from_naive_utc_and_offset (
784- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 6 ) // Sunday
784+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 6 ) // Sunday
785785 . unwrap ( )
786786 . and_hms_opt ( 15 , 59 , 59 )
787787 . unwrap ( ) ,
@@ -803,7 +803,7 @@ mod tests {
803803
804804 // Monday 20:59:59 UTC = 21:59:59 London - just before start time
805805 let monday_before_start = DateTime :: from_naive_utc_and_offset (
806- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
806+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
807807 . unwrap ( )
808808 . and_hms_opt ( 20 , 59 , 59 )
809809 . unwrap ( ) ,
@@ -813,7 +813,7 @@ mod tests {
813813
814814 // Monday 21:00:01 UTC = 22:00:01 London - just after start time
815815 let monday_after_start = DateTime :: from_naive_utc_and_offset (
816- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
816+ NaiveDate :: from_ymd_opt ( 2025 , 6 , 30 ) // Monday
817817 . unwrap ( )
818818 . and_hms_opt ( 21 , 0 , 1 )
819819 . unwrap ( ) ,
@@ -823,7 +823,7 @@ mod tests {
823823
824824 // Tuesday 4:59:59 UTC = 5:59:59 London - just before end time, still Monday's session
825825 let tuesday_before_end = DateTime :: from_naive_utc_and_offset (
826- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
826+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
827827 . unwrap ( )
828828 . and_hms_opt ( 4 , 59 , 59 )
829829 . unwrap ( ) ,
@@ -833,7 +833,7 @@ mod tests {
833833
834834 // Tuesday 5:00:00 UTC = 6:00:00 London - at end time, should be inactive
835835 let tuesday_at_end = DateTime :: from_naive_utc_and_offset (
836- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
836+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 1 ) // Tuesday
837837 . unwrap ( )
838838 . and_hms_opt ( 5 , 0 , 0 )
839839 . unwrap ( ) ,
@@ -843,7 +843,7 @@ mod tests {
843843
844844 // Friday 21:00:01 UTC = 22:00:01 London - after start time but on Friday which is excluded
845845 let friday_night = DateTime :: from_naive_utc_and_offset (
846- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
846+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
847847 . unwrap ( )
848848 . and_hms_opt ( 21 , 0 , 1 )
849849 . unwrap ( ) ,
@@ -853,7 +853,7 @@ mod tests {
853853
854854 // Thursday 21:00:01 UTC = 22:00:01 London - Thursday night session should be active
855855 let thursday_night = DateTime :: from_naive_utc_and_offset (
856- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 3 ) // Thursday
856+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 3 ) // Thursday
857857 . unwrap ( )
858858 . and_hms_opt ( 21 , 0 , 1 )
859859 . unwrap ( ) ,
@@ -863,7 +863,7 @@ mod tests {
863863
864864 // Friday 4:59:59 UTC = 5:59:59 London - still Thursday's session ending on Friday morning
865865 let friday_morning = DateTime :: from_naive_utc_and_offset (
866- chrono :: NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
866+ NaiveDate :: from_ymd_opt ( 2025 , 7 , 4 ) // Friday
867867 . unwrap ( )
868868 . and_hms_opt ( 4 , 59 , 59 )
869869 . unwrap ( ) ,
0 commit comments