Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Generators for Joda Period classes:
Everything seems quite straightforward right now, but I'd love to get some early input on the code, as well as some fundamental things like:
org.scalacheck.datetime
or similar, copying other libraries such as scalacheck-shapeless.genDateTimeWithinPeriod
, by calculating the correct parameters, such as methods which take:A period either side of a DateTime (as noted above):
Two periods, so that the offset either side of the given DateTime can be different:
Note these two suggestions are not completely logical as a period has a notion of being positive or negative, and there's no abstraction that represents just the magnitude of a period (what does it mean to have a negative period for the time before the given DateTime???), I'm half thinking of just including documentation as to how to do this, to keep the API clean and reducing confusion due to ambiguity.
Finally, just to mention this code so far is only for Joda's classes, I intend to update this to generate different classes from other libraries, such as Java 8's Date and Time API.
Closes #1