Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

java.time.LocalDate support? #36

Open

Description

@tobyweston

We've done something like this to support decoding dates form our config files

implicit val configuredLocalDate: Configured[LocalDate] = new Configured[LocalDate] {
  def apply(a: CfgValue) = Some(LocalDate.parse(a.pretty.replace("\"", ""), ofPattern("dd MMM yyyy")))
}

Is that something that could/should go into the CfgValue trait? We'd do a pull request but aren't sure how you'd prefer it to slot in.

Activity

  1. rossabaker commented on Dec 20, 2017

    @rossabaker
    Contributor

    My apologies. This escaped my notice until now.

    I think the problem with making this an implicit instance is that there are so many date formats. Why that pattern instead of something from ISO 8601? If we can think of a good solution to that, I'm open to adding it. I suppose there could be an explicit instance that takes the pattern as an argument, from which an implicit could be created.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions