Skip to content

Commit

Permalink
add a test for day of year without year
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacronemeyer committed Nov 30, 2020
1 parent 48e0670 commit f0f4420
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/date_strptime_scenarios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ def test_date_strptime_without_day
assert_equal Date.strptime('1999-04', '%Y-%m'), Date.new(1999, 4, 1)
end

def test_date_strptime_day_of_year_without_year
assert_equal Date.strptime("153", '%j'), Date.new(1984, 6, 1)
end

def test_date_strptime_without_specifying_format
assert_equal Date.strptime('1999-04-14'), Date.new(1999, 4, 14)
end
Expand Down

0 comments on commit f0f4420

Please sign in to comment.