Skip to content

fixed date_to_day_of_year calc issue#6

Open
fuhuo wants to merge 1 commit into
derekenos:masterfrom
fuhuo:master
Open

fixed date_to_day_of_year calc issue#6
fuhuo wants to merge 1 commit into
derekenos:masterfrom
fuhuo:master

Conversation

@fuhuo

@fuhuo fuhuo commented Feb 27, 2024

Copy link
Copy Markdown

No description provided.

@derekenos

Copy link
Copy Markdown
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

fuhuo commented Feb 28, 2024

Copy link
Copy Markdown
Author

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

fuhuo commented Feb 28, 2024

Copy link
Copy Markdown
Author

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.

2 participants