-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from theiterators/instances-year-int
Changing Year instance representation - from String to Int
- Loading branch information
Showing
5 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
instances/src/main/scala/pl/iterators/kebs/instances/time/YearInt.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package pl.iterators.kebs.instances.time | ||
|
||
import pl.iterators.kebs.instances.InstanceConverter | ||
import pl.iterators.kebs.instances.time.YearInt.YearFormat | ||
|
||
import java.time.Year | ||
|
||
trait YearInt { | ||
implicit val yearFormatter: InstanceConverter[Year, Int] = | ||
InstanceConverter[Year, Int](_.getValue, Year.of, Some(YearFormat)) | ||
} | ||
object YearInt { | ||
private[instances] val YearFormat = "ISO-8601 standard format e.g. 2007" | ||
} |
14 changes: 0 additions & 14 deletions
14
instances/src/main/scala/pl/iterators/kebs/instances/time/YearString.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters