natashamoorfield / npm_calmarendian_date

GNU General Public License v3.0
0 stars 0 forks source link

Add `CalmarendianTimeDelta` Class #19

Open natashamoorfield opened 2 years ago

natashamoorfield commented 2 years ago

An equivalent of the Python Standard Library timedelta class.

natashamoorfield commented 2 years ago

We should consider only allowing time deltas measured in days and subdivisions thereof (hours, minutes, etc) because of the complications inherent in the way Festival days are ignored when counting off weeks. This complication means that, for example, a period said to be ten weeks in duration will not always or necessarily be only 70 days long. For deltas quoted in weeks, consider implementing a WeekDelta class similar to the Gregorian MonthDelta class in monthdelta or the relativedelta class in python-dateutil. Alternatively, it might be better to implement an add_weeks() method direct into the CalmarendianDate class.

natashamoorfield commented 2 years ago

An improvement upon the WeekDelta idea might be to have, say, a CalendarDelta class which can be used to successively apply grand-cycle, cycle, season and week deltas to a date.