ISO 8601: Ending the Date Wars
hackaday.com
hackaday.com
dt = Time.parse('2021-02-01 00:00:00 UTC')
dt + ActiveSupport::Duration.parse('P1M')
=> 2021-03-01 00:00:00 UTC
This takes care of calculating what a "month" actually is, instead of erroneously adding 30 days in seconds to the datetime, which can result in an inconsistent billing cycle: dt + 30.days.to_i
=> 2021-03-03 00:00:00 UTC