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

Confusing 1.month.ago == today #23

Closed
awronski opened this issue Sep 2, 2018 · 1 comment
Closed

Confusing 1.month.ago == today #23

awronski opened this issue Sep 2, 2018 · 1 comment

Comments

@awronski
Copy link

awronski commented Sep 2, 2018

Why 1.month is 0 based and is not consistent with other properties?

This very confusing when 1.month.ago == today

    val monthAgo = 1.month.ago.month
    val today = Dates.today.month
    assert(monthAgo == today)
@DupinC
Copy link

DupinC commented Oct 19, 2018

Same issue, I don't understand this line :

get() = Duration(unit = Calendar.MONTH, value = this - 1)

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

No branches or pull requests

3 participants