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

Later values can sometimes be earlier than the early values #33

Open
markfinger opened this issue Jun 22, 2020 · 1 comment
Open

Later values can sometimes be earlier than the early values #33

markfinger opened this issue Jun 22, 2020 · 1 comment

Comments

@markfinger
Copy link
Contributor

'c.1900-100' results in latest values that are earlier than the early values.

In [8]: from edtf.convert import jd_to_struct_time

In [9]: jd_to_struct_time(w.creation_date_earliest)
Out[9]: time.struct_time(tm_year=1900, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1)

In [10]: jd_to_struct_time(w.creation_date_earliest_fuzzy)
Out[10]: time.struct_time(tm_year=1899, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1)

In [11]: jd_to_struct_time(w.creation_date_latest)
Out[11]: time.struct_time(tm_year=100, tm_mon=12, tm_mday=31, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1)

In [12]: jd_to_struct_time(w.creation_date_latest_fuzzy)
Out[12]: time.struct_time(tm_year=100, tm_mon=12, tm_mday=31, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1)

In [13]: w.creation_date_display
Out[13]: 'c.1900-100'

@markfinger markfinger changed the title Later values can sometimes be earlier than the early values. Later values can sometimes be earlier than the early values Jun 22, 2020
@markfinger
Copy link
Contributor Author

Another example:

[w.creation_date_display, jd_to_struct_time(w.creation_date_earliest), jd_to_struct_time(w.creation_date_earliest_fuzzy), jd_to_struct_time(w.creation_date_latest), jd_to_struct_time(w.creation_date_latest_fuzzy)]
['1880-914',
 time.struct_time(tm_year=1880, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1),
 time.struct_time(tm_year=1880, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1),
 time.struct_time(tm_year=914, tm_mon=12, tm_mday=31, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1),
 time.struct_time(tm_year=914, tm_mon=12, tm_mday=31, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=0, tm_yday=0, tm_isdst=-1)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant