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

Add millis method to RichDateTime #62

Merged
merged 1 commit into from
May 17, 2014

Conversation

kmizu
Copy link

@kmizu kmizu commented May 16, 2014

@kmizu kmizu mentioned this pull request May 16, 2014
@xuwei-k
Copy link
Member

xuwei-k commented May 16, 2014

please squash commits.

@kmizu
Copy link
Author

kmizu commented May 16, 2014

@xuwei-k OK.

@xuwei-k
Copy link
Member

xuwei-k commented May 16, 2014

LGTM

kmizu pushed a commit that referenced this pull request May 17, 2014
Add millis method to RichDateTime
@kmizu kmizu merged commit 19fc86d into nscala-time:master May 17, 2014
@kmizu kmizu mentioned this pull request May 25, 2014
@rtyley
Copy link

rtyley commented Jul 22, 2014

This actually broke some code for me!

We used to have:

val t: Long = expiration.millis

...which was using com.github.nscala_time.time.RichReadableInstant in nscala 0.8.0:

def millis: Long = underlying.getMillis

... but the new code in com.github.nscala_time.time.RichDateTime with this PR (def millis: DateTime.Property = underlying.millisOfSecond()) clashed with that (because we were using import com.github.nscala_time.time.Imports._) and caused a compilation error:

type mismatch;
[error]  found   : org.joda.time.DateTime.Property
[error]  required: Long

Not saying that this PR shouldn't have gone in, just surprising how things can break, is all...

As a cheap fix, I'm now just importing:

import com.github.nscala_time.time.Imports.richReadableInstant

@rtyley
Copy link

rtyley commented Jul 22, 2014

Or, better, just expiration.getMillis...!

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

Successfully merging this pull request may close these issues.

None yet

3 participants