1
0

Introduce monkey patch for date

Allows to retrieve the begin of month for a given date
This commit is contained in:
Tim Kächele 2021-03-07 18:07:50 +01:00
parent 2e3a68e285
commit e0d300c441

View File

@ -0,0 +1,8 @@
require 'date'
# Nasty monkey patching to make date objects know about the beginning of a month
class Date
def begin_of_month
Date.new(year, month, 1)
end
end