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

fixed date_to_day_of_year calc issue #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fuhuo
Copy link

@fuhuo fuhuo commented Feb 27, 2024

No description provided.

@derekenos
Copy link
Owner

Thanks for your submission @fuhuo ! These changes, however, break some other things. If you can provide an example of how the current code produces an incorrect result, I'll investigate. Thanks!

@fuhuo
Copy link
Author

fuhuo commented Feb 28, 2024

Ok.Thanks for your reply.Sorry for not giving it serious thought.
I have the datetime below:

28 Feb 2024 00:44:59

when i use strptime

strptime('28 Feb 2024 00:44:59', "%d %b %Y %H:%M:%S")

it return

struct_time(tm_year=2024, tm_mon=1, tm_mday=28, tm_hour=0, tm_min=44, tm_sec=59, tm_wday=6, tm_yday=28)

the value tm_yday be 28. but i use python buildin time lib, it return 59:

>>> time.strptime('28 Feb 2024 00:44:59', "%d %b %Y %H:%M:%S")                                                               
time.struct_time(tm_year=2024, tm_mon=2, tm_mday=28, tm_hour=0, tm_min=44, tm_sec=59, tm_wday=2, tm_yday=59, tm_isdst=-1)

@fuhuo
Copy link
Author

fuhuo commented Feb 28, 2024

by the way, I found var: MONTH_NAMES and ABBREVIATED_MONTH_NAMES in __init__.py,lost "," between July and Auguest.it may take some issue.

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

Successfully merging this pull request may close these issues.

None yet

2 participants