Skip to content

Commit

Permalink
one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Sep 23, 2022
1 parent 92afc4a commit 0121c5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/Tests/src/Data/Time/Date_Time_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,15 @@ spec_with name create_new_datetime parse_datetime nanoseconds_loss_in_precision=
d1.start_of (Date_Period.Week first_day=Day_Of_Week.Saturday) . should_equal (Date_Time.new 2022 9 10)
d1.end_of (Date_Period.Week first_day=Day_Of_Week.Saturday) . should_equal (Date_Time.new 2022 9 16 23 59 59 max_nanos)

d2 = create_new_datetime 2022 2 7 12 34 56 123456789
d2 = create_new_datetime 2022 2 6 12 34 56 123456789
d2.start_of Date_Period.Quarter . should_equal (Date_Time.new 2022 1 1)
d2.end_of Date_Period.Quarter . should_equal (Date_Time.new 2022 3 31 23 59 59 max_nanos)
d2.start_of Date_Period.Month . should_equal (Date_Time.new 2022 2 1)
d2.end_of Date_Period.Month . should_equal (Date_Time.new 2022 2 28 23 59 59 max_nanos)
d2.start_of (Date_Period.Week) . should_equal (Date_Time.new 2022 1 31)
d2.end_of (Date_Period.Week) . should_equal (Date_Time.new 2022 2 6 23 59 59 max_nanos)
d2.start_of (Date_Period.Week first_day=Day_Of_Week.Sunday) . should_equal (Date_Time.new 2022 2 6)
d2.end_of (Date_Period.Week first_day=Day_Of_Week.Sunday) . should_equal (Date_Time.new 2022 2 12 23 59 59 max_nanos)

d3 = create_new_datetime 2020 2 19
d3.start_of Date_Period.Year . should_equal (Date_Time.new 2020 1 1)
Expand Down

0 comments on commit 0121c5e

Please sign in to comment.