Browse Source

CLDC-NONE: Add year to date to collection_time_helper (#3146)

as suggested in CLDC-4145 review
pull/3148/head v0.6.1
Samuel Young 1 week ago committed by GitHub
parent
commit
520e46086f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      app/helpers/collection_time_helper.rb

4
app/helpers/collection_time_helper.rb

@ -4,6 +4,10 @@ module CollectionTimeHelper
date < window_end_date ? date.year - 1 : date.year
end
def collection_start_date_for_year(year)
Time.zone.local(year, 4, 1)
end
def current_collection_start_year
collection_start_year_for_date(Time.zone.now)
end

Loading…
Cancel
Save