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

[ji] support Java time APIs with Time/Date/DateTime #5183

Merged
merged 4 commits into from May 23, 2018

Conversation

Projects
None yet
2 participants
@kares
Member

kares commented May 22, 2018

e.g. Time.now.to_java(java.time.LocalDateTime) and friends with some consumable Java APIs

... backwards compatibility maintained -> time.to_java still gives a java.util.Date (by default)

@kares kares added this to the JRuby 9.2.0.0 milestone May 22, 2018

/**
* Return the nano-seconds of this time.
* @return nano seconds (only)
*/
public long getNanos() {
return (getTimeInMillis() % 1000) * 1_000_000 + getNSec();
public int getNanos() {

This comment has been minimized.

@headius

headius May 23, 2018

Member

These signature changes are not against 9.1 public APIs are they?

This comment has been minimized.

@kares

kares May 23, 2018

Member

Java API uses int so for consistency
its a new method here (added and changed between commits in the PR)

@headius

The changes seem good and are not very invasive. If any of the signature changes affect public APIs from 9.1 we'll have to evaluate that impact.

@kares kares merged commit 397fdc8 into jruby:master May 23, 2018

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment