16552, “ben-albrecht”, “Add more math operations for DateTime types”, “2020-10-05T14:26:40Z”
Feature request for adding more math operation combinations for addition and subtraction of the types: date
, time
, and datetime
.
For example, in switching from Time.getCurrentTime()
to using the DateTime
module, one must write:
(datetime.now() - datetime.now().replace(hour=0,minute=0,second=0,microsecond=0)).total_seconds()
whereas it’d be nice to do something like:
(datetime.now() - date.today()).total_seconds()