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 full support for date and time formats #6

Merged
merged 2 commits into from
Mar 5, 2018
Merged

Conversation

tindzk
Copy link
Collaborator

@tindzk tindzk commented Feb 24, 2018

This addresses issue #3.

@tindzk tindzk requested a review from jvican February 24, 2018 22:39
Copy link
Owner

@jvican jvican left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking the time to do this! Do you want me to cut a release now?

@jvican
Copy link
Owner

jvican commented Mar 1, 2018

Oh, it seems that Travis is failing because java.time is only available in JDK8?

[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:3: object time is not a member of package java
[error] import java.time.{
[error]             ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:63: not found: type JLocalDate
[error]   case class Date          (elem: JLocalDate     ) extends AnyVal with Elem
[error]                                   ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:64: not found: type JLocalTime
[error]   case class Time          (elem: JLocalTime     ) extends AnyVal with Elem
[error]                                   ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:65: not found: type JLocalDateTime
[error]   case class DateTime      (elem: JLocalDateTime ) extends AnyVal with Elem
[error]                                   ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:66: not found: type JOffsetDateTime
[error]   case class OffsetDateTime(elem: JOffsetDateTime) extends AnyVal with Elem
[error]                                   ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:171: not found: value JLocalTime
[error]     Time(JLocalTime.of(h.toInt, m.toInt, s.toInt, nano))
[error]          ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:177: not found: value JLocalDate
[error]     Date(JLocalDate.of(y.toInt, m.toInt, d.toInt))
[error]          ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:183: not found: value JLocalDateTime
[error]     DateTime(JLocalDateTime.of(date.elem, time.elem))
[error]              ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:190: not found: value JOffsetDateTime
[error]       JOffsetDateTime.of(dateTime.elem, ZoneOffset.of(offset)))
[error]       ^
[error] /home/travis/build/jvican/stoml/src/main/scala/stoml/TomlParser.scala:190: not found: value ZoneOffset
[error]       JOffsetDateTime.of(dateTime.elem, ZoneOffset.of(offset)))
[error]                                         ^
[error] 10 errors found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 30 s, completed Feb 24, 2018 10:41:21 PM

@tindzk
Copy link
Collaborator Author

tindzk commented Mar 1, 2018

Sure, feel free to release a new version.

I saw the problem on Travis-CI as well. Unless we need to support older JDK versions, I think the easiest would be to remove those versions from .travis.yml.

@jvican
Copy link
Owner

jvican commented Mar 5, 2018

Happy to remove support for JDK6 and JDK7. Can you commit the changes in this branch?

java.time is not available in OpenJDK 7
@tindzk
Copy link
Collaborator Author

tindzk commented Mar 5, 2018

Sure, I made the changes.

@jvican jvican merged commit e225cea into jvican:master Mar 5, 2018
@jvican
Copy link
Owner

jvican commented Mar 5, 2018

Thank you Tim. Version 0.5 has just been published: https://dl.bintray.com/jvican/releases/me/vican/jorge/stoml_2.12/0.5/.

@tindzk tindzk deleted the datetime branch March 5, 2018 16:37
@tindzk
Copy link
Collaborator Author

tindzk commented Mar 5, 2018

Great, thanks a lot!

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.

None yet

2 participants