Groovy Duration Extensions

Groovy extensions for converting Numbers to a Duration

License

License

MIT
Categories

Categories

Groovy Languages KeY Data Data Formats Formal Verification
GroupId

GroupId

com.github.tddmonkey
ArtifactId

ArtifactId

groovy-extensions-duration
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Groovy Duration Extensions
Groovy extensions for converting Numbers to a Duration
Project URL

Project URL

https://github.com/tddmonkey/groovy-extensions
Source Code Management

Source Code Management

https://github.com/tddmonkey/groovy-extensions.git

Download groovy-extensions-duration

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.tddmonkey/groovy-extensions-duration/ -->
<dependency>
    <groupId>com.github.tddmonkey</groupId>
    <artifactId>groovy-extensions-duration</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.tddmonkey/groovy-extensions-duration/
implementation 'com.github.tddmonkey:groovy-extensions-duration:0.0.1'
// https://jarcasting.com/artifacts/com.github.tddmonkey/groovy-extensions-duration/
implementation ("com.github.tddmonkey:groovy-extensions-duration:0.0.1")
'com.github.tddmonkey:groovy-extensions-duration:jar:0.0.1'
<dependency org="com.github.tddmonkey" name="groovy-extensions-duration" rev="0.0.1">
  <artifact name="groovy-extensions-duration" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.tddmonkey', module='groovy-extensions-duration', version='0.0.1')
)
libraryDependencies += "com.github.tddmonkey" % "groovy-extensions-duration" % "0.0.1"
[com.github.tddmonkey/groovy-extensions-duration "0.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.codehaus.groovy : groovy jar 2.4.5

test (1)

Group / Artifact Type Version
org.spockframework : spock-core jar 1.0-groovy-2.4

Project Modules

There are no modules declared in this project.

Groovy Time Extensions

This is a simple library that adds extensions methods to Groovy numbers to generate a Java 8 Duration object

Usage

Duration.of(8, ChronoUnit.SECONDS) == 8.seconds()

The following units are available:

NANOS
MILLIS
SECONDS
HOURS	
HALF_DAYS
DAYS

Building

Groovy Extensions is built using the Gradle wrapper and uses Spock for tests

$ ./gradlew test

Versions

Version
0.0.1