Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error encoding dates before 1900 #1

Open
svituz opened this issue Jul 16, 2014 · 0 comments
Open

Error encoding dates before 1900 #1

svituz opened this issue Jul 16, 2014 · 0 comments
Labels

Comments

@svituz
Copy link
Member

svituz commented Jul 16, 2014

Description

If the value of an element of type DTM is before 1900, calling the method to_er7() raises an error

How to reproduce

Create a DTM object with the year before 1900 and call to_er7() on it

d = DTM( datetime.date(1800, 12, 20) )
d.to_er7()

What happens

It raises

ValueError: year=1800 is before 1900; the datetime strftime() methods require year >= 1900

What should happen

It should return the correct ER7 representation of the DTM object

Notes

  • It happens also with DT objects
  • The error is raised by strftime which doesn't support years before 1900
@svituz svituz added the bug label Jul 16, 2014
svituz pushed a commit that referenced this issue Dec 15, 2020
Start support for v2.5.2/harmonized v2.5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant