Skip to content

Commit

Permalink
Adjust month formatting to Mon-Year
Browse files Browse the repository at this point in the history
  • Loading branch information
rsanheim committed Aug 24, 2020
1 parent aa5f200 commit 36c042e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/initializers/time_and_date_formats.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Time::DATE_FORMATS[:mon_year] = "%b %Y"
Date::DATE_FORMATS[:mon_year] = "%b %Y"
Time::DATE_FORMATS[:mon_year] = "%b-%Y"
Date::DATE_FORMATS[:mon_year] = "%b-%Y"

Time::DATE_FORMATS[:month_year] = "%B %Y"
Date::DATE_FORMATS[:month_year] = "%B %Y"
2 changes: 1 addition & 1 deletion spec/models/period_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
end

it "has to_s in correct format" do
expect(jan_1_2019_month_period.to_s).to eq("Jan 2019")
expect(jan_1_2019_month_period.to_s).to eq("Jan-2019")
expect(q1_2019_period.to_s).to eq("Q1-2019")
end

Expand Down

0 comments on commit 36c042e

Please sign in to comment.