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

Cross year display error #42

Closed
Childdreams opened this issue Nov 20, 2020 · 2 comments
Closed

Cross year display error #42

Childdreams opened this issue Nov 20, 2020 · 2 comments

Comments

@Childdreams
Copy link

month = moment.now().sub(month=20).format("%Y-MM")
print (month)


month : 2020-03
now : 2020-11-19

Correct results 2019-03

@Childdreams
Copy link
Author

my python version : 3.7
date.py line 30
should beyear = date.year int(month // 12)
not year = date.year int(month / 12)
because line 25 month = date.month - 1 - number

zachwill added a commit that referenced this issue Nov 25, 2020
@zachwill
Copy link
Owner

Sorry about this bug, @Childdreams. Version 0.12 should fix it for you 👍

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

2 participants