On Tue, Jun 16, 2020 at 11:55 PM Serhiy Storchaka <storchaka@gmail.com> wrote:
First we need to solve some problems.

1. Parsing dates with more than 4-digit year. Note that many external
implementations do not support such data, so we need a way to restrict
the data range when convert them to string representation.

do we? I've always been disappointed that parsing was not really part of datetime, but now I see the advantage. the datetime type(s) are their own thing -- they do not need to be fully compatible with anything else.

It would be nice if, e.g. ISO 8601 supported "infinite time", but AFAIK, it doesn't, which makes interoperability a pain, but that's the case regardless.

That doesn't mean we don't need a way to stringify infinite time, but all we can do is look to see if there is a common format we can use, and if not, make one up. But this is an argument for having it in the stdlib -- at least it would be consistent within Python.

2. String representations and parsing for negative data.

why? wouldn't the only extension be infinite time and negative infinite time? nothing else would need to change at all. (unless there is more than one "standard" we want to support.

3. String representations and parsing for infinity data (positive and
negative).

yup -- let the bike shedding begin!

4. If datetime.min will be the negative infinity,

I think that is a "Bad Idea" -- the infinities need their own representation.

-CHB

--
Christopher Barker, PhD

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