pydantic/speedate

Optionally allow more digits in second fraction

samuelcolvin opened this issue · 4 comments

See pydantic/pydantic#6411

Extra digits should be rounded but otherwise ignored - e.g. fraction should still be stored as a microseconds int.

fraction should still be stored as a microseconds int

do we loose precision here? I suppose that we should try to match the precision of Python’s datetime and that’s good enough.

This needs a new argument to all the parse_* methods on DateTime and Time.

Maybe while we're making that change, we should make that new argument Config, so we can extend it without more breaking changes to the API?

Maybe while we're making that change, we should make that new argument Config, so we can extend it without more breaking changes to the API?

e.g. #41

fixed by #42.