On Sat, Aug 22, 2020 at 10:29 AM Richard Damon <Richard@damon-family.org> wrote:
On 8/22/20 1:07 PM, Stephen J. Turnbull wrote:
> If anything is to be added, I would prefer using ISO 8601 durations.
>
> https://en.wikipedia.org/wiki/ISO_8601#Durations
>
> The main differences are use of "P" and "T" to signal that it is a
> duration and allow both minutes and months to be identified by "M",
> and decimal fractions of the smallest unit present are permitted, and
> seconds is the smallest unit, so the above would be represented

One issue with allowing Months here is then suddenly an interval becomes
dependent on when it is, so needs to be keep in a complex form, as a
month (and year) are variable length time units.

Also, the math gets funny when you do things like this. Jan 31st + 1
month is Feb 28th (or 29th) + 1 month is March 28th (or 29th), but Jan
31st + 2 Months is March 31st, Similarly, adding a month and then
subtracting a month doesn't always get you back to your starting time.

--
Richard Damon
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/PAHZ6QSHPFZ5ZT57GMJDLTZLCAKQOVZ6/
Code of Conduct: http://python.org/psf/codeofconduct/


--
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython