htime

A Java library for human readable date and time formatters

License

License

GroupId

GroupId

com.cronutils
ArtifactId

ArtifactId

htime
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

htime
A Java library for human readable date and time formatters
Project URL

Project URL

http://cron-utils.com/
Source Code Management

Source Code Management

https://github.com/jmrozanec/htime

Download htime

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.commons : commons-lang3 jar 3.3.2
joda-time : joda-time jar 2.3
com.google.guava : guava jar 18.0

test (3)

Group / Artifact Type Version
org.mockito : mockito-core jar 1.9.5
org.powermock : powermock-module-junit4 jar 1.5.5
org.powermock : powermock-api-mockito jar 1.5.5

Project Modules

There are no modules declared in this project.

htime

A Java library to make it easy for humans format a date. You no longer need to remember date time formatting chars: just write an example, and you will get the appropriate formatter.

The project follows the Semantic Versioning Convention and uses Apache 2.0 license.

Flattr this! Build Status

Project stats by OpenHub

Download

htime is available on Maven central repository.

<dependency>
    <groupId>com.cronutils</groupId>
    <artifactId>htime</artifactId>
    <version>1.0.0</version>
</dependency>

Features

  • Provide any date time format written in human readable text, and get the appropriate date time formatter!

Usage Examples

Get JDK SimpleDateFormatter

//define your own expressions to be formatted
HDateTimeFormat hDateTimeFormat =
        HDateTimeFormatBuilder.getInstance().forJDK12().getFormatter();
SimpleDateFormat jdkTimeFormatter = hDateTimeFormat.forPattern("June 9, 2011");
String formattedDate = jdkTimeFormatter.format(new Date());
//formattedDate will be ex.: "June 9, 2015"

Get JodaTime DateTimeFormatter

//define your own expressions to be formatted
HDateTimeFormat hDateTimeFormat =
        HDateTimeFormatBuilder.getInstance().forJodaTime().getFormatter();
DateTimeFormatter jodaTimeFormatter = hDateTimeFormat.forPattern("June 9, 2011");
String formattedDate = jodaTimeFormatter.print(DateTime.now());
//formattedDate will be ex.: "June 9, 2015"

Contribute & Support!

Contributions are welcome! You can contribute by

  • star and/or Flattr this repo!
  • requesting or adding new features. Check our roadmap!
  • enhancing existing code: ex.: provide more accurate description cases
  • testing
  • enhancing documentation
  • providing translations to support new locales
  • bringing suggestions and reporting bugs
  • spreading the word / telling us how you use it!

Check our page! For stats about the project, you can visit our OpenHUB profile.

Support us donating once or by subscription through Flattr!

Flattr this!

Versions

Version
1.0.0