Skip to content

Scala string interpolaters for parsing string literals into `java.time` instances at compile time

License

Notifications You must be signed in to change notification settings

bpholt/java-time-literals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

203 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java.time Literals

Parse Scala string literals into java.time instances at compile time.

> import dev.holt.javatime.literals._
> duration"PT20.345S"
val res0: java.time.Duration = PT20.345S

See the test suite for comprehensive examples of all supported literal types.

Scala.js and Scala Native

Since Scala.js and Scala Native don't have a built-in timezone database, if you need to use timezones other than UTC on those platforms, make sure to include

"io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.5.0"

in your project dependencies.

About

Scala string interpolaters for parsing string literals into `java.time` instances at compile time

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages