File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
exercises/practice/gigasecond Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,27 +3,27 @@ module main
33import time
44
55fn test_date_specified_of_time () {
6- assert add_gigasecond (time.parse_rfc3339 ('2011-04-25' )! ) == time.parse_rfc3339 ('2043-01-01T01:46:40' )!
6+ assert add_gigasecond (time.parse_iso8601 ('2011-04-25' )! ) == time.parse_iso8601 ('2043-01-01T01:46:40' )!
77}
88
99fn test_second_date_specified_of_time () {
10- assert add_gigasecond (time.parse_rfc3339 ('1977-06-13' )! ) == time.parse_rfc3339 ('2009-02-19T01:46:40' )!
10+ assert add_gigasecond (time.parse_iso8601 ('1977-06-13' )! ) == time.parse_iso8601 ('2009-02-19T01:46:40' )!
1111}
1212
1313fn test_third_date_specified_of_time () {
14- assert add_gigasecond (time.parse_rfc3339 ('1959-07-19' )! ) == time.parse_rfc3339 ('1991-03-27T01:46:40' )!
14+ assert add_gigasecond (time.parse_iso8601 ('1959-07-19' )! ) == time.parse_iso8601 ('1991-03-27T01:46:40' )!
1515}
1616
1717fn test_full_time_specified () {
18- assert add_gigasecond (time.parse_rfc3339 ('2015-01-24T22:00:00' )! ) == time.parse_rfc3339 ('2046-10-02T23:46:40' )!
18+ assert add_gigasecond (time.parse_iso8601 ('2015-01-24T22:00:00' )! ) == time.parse_iso8601 ('2046-10-02T23:46:40' )!
1919}
2020
2121fn test_full_time_with_day_roll_over () {
22- assert add_gigasecond (time.parse_rfc3339 ('2015-01-24T23:59:59' )! ) == time.parse_rfc3339 ('2046-10-03T01:46:39' )!
22+ assert add_gigasecond (time.parse_iso8601 ('2015-01-24T23:59:59' )! ) == time.parse_iso8601 ('2046-10-03T01:46:39' )!
2323}
2424
2525fn test_immutable () {
26- moment := time.parse_rfc3339 ('2015-01-24T23:59:59' )!
26+ moment := time.parse_iso8601 ('2015-01-24T23:59:59' )!
2727 res := add_gigasecond (moment)
28- assert moment == time.parse_rfc3339 ('2015-01-24T23:59:59' )!
28+ assert moment == time.parse_iso8601 ('2015-01-24T23:59:59' )!
2929}
You can’t perform that action at this time.
0 commit comments