org.otclfoundation:dateconverters

A library to convert date between various types and string.

License

License

GroupId

GroupId

org.otclfoundation
ArtifactId

ArtifactId

dateconverters
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

org.otclfoundation:dateconverters
A library to convert date between various types and string.
Project URL

Project URL

https://github.com/fjna-java/dateconverters/blob/master/README.md
Source Code Management

Source Code Management

https://github.com/fjna-java/dateconverters

Download dateconverters

How to add to project

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

Dependencies

compile (6)

Group / Artifact Type Version
org.junit.vintage : junit-vintage-engine jar 5.5.1
org.slf4j : slf4j-api jar 1.7.30
ch.qos.logback : logback-classic jar 1.2.3
ch.qos.logback : logback-core jar 1.2.3
joda-time : joda-time jar 2.10.6
com.github.sisyphsu : dateparser jar 1.0.0

Project Modules

There are no modules declared in this project.

dateConverters library

This is a small date-converter library wherein it converts a date of any date-types mutually between various below date APIs without any need to write any date-conversion code to convert dates between these date API libraries.

  1. Old-school jdk date API

  2. Java8 time API

  3. Joda date API.

  4. Also converts from date-string to date (date-format string not required).

If a date-string is provided for conversion, there is absolutely no need to specify any date-format string. By using this library, a developer does neither have to write any boilerplate code nor even have to be concerned about date-patterns for any of the date-string conversions. Just a single line of code is all what is required -

  'DateConverterFacade.convert(<date object or date-string>, <target-date-class-type>);'

which returns the converted date object.

As already mentioned, for converting date-strings, there is no specify the date-format. The date-format is automatically determined from the given date-string by another library contributed by https://github.com/sisyphsu/dateparser. The rest of the mutual date-type conversions is done by the "dateconverter" library.

Versions

Version
1.0