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

Support java.util.Date methods using java.time.Instant. #2088

Merged

Conversation

WojciechMazur
Copy link
Contributor

@WojciechMazur WojciechMazur commented Dec 23, 2020

This PR adds methods added in Java8 to java.util.Date that is method toInstant and Date.from(_: Instant)
It should be rebased on top of merged #2079 as it contains bootstrap of testsExt project and on top of #2087 where Instant.ofEpochSeconds method used in tests was implemented.

@WojciechMazur WojciechMazur linked an issue Dec 28, 2020 that may be closed by this pull request
@WojciechMazur WojciechMazur marked this pull request as ready for review December 29, 2020 17:03
@ekrich
Copy link
Member

ekrich commented Dec 29, 2020

You have a typo in the title - should be java.util.Date.

@WojciechMazur WojciechMazur changed the title Support java.util.Data Instant dependent methods Support java.util.Date Instant dependent methods Dec 29, 2020
@WojciechMazur WojciechMazur marked this pull request as draft December 29, 2020 17:29
Copy link
Collaborator

@sjrd sjrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be accompanied by a port of InstantTest in the unit-test-ext. This is important to make sure that relying on the ArithmeticException is indeed correct.

Otherwise, LGTM. (Probably shouldn't be Draft anymore.)

@WojciechMazur
Copy link
Contributor Author

WojciechMazur commented Jan 4, 2021

InstantTest was ported in #2087, when it's merged I'll rebase this branch on top of it and convert from draft. It then also fix errors in CI

@WojciechMazur WojciechMazur force-pushed the feature/ju.Date_instant_methods branch from 7c777f5 to de3d2a4 Compare January 7, 2021 15:52
@WojciechMazur WojciechMazur marked this pull request as ready for review January 7, 2021 15:54
@sjrd sjrd changed the title Support java.util.Date Instant dependent methods Support java.util.Date methods using java.time.Instant. Jan 7, 2021
@sjrd sjrd merged commit df731e9 into scala-native:master Jan 7, 2021
@WojciechMazur WojciechMazur deleted the feature/ju.Date_instant_methods branch February 15, 2021 09:09
ekrich pushed a commit to ekrich/scala-native that referenced this pull request May 21, 2021
WojciechMazur added a commit to WojciechMazur/scala-native that referenced this pull request Aug 25, 2021
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.

Port Java Date Instant methods
3 participants