date4j

General

Category
Free
Tag
Utils
License
BSD License
Registered
Aug 7, 2014
Favorites
0
Link
https://github.com/johanley/date4j
See also
Countries
Toggle
jOOR
Droid-Fu
Migratron

Additional

Language
Java
Version
N/A
Created
Jul 7, 2015
Updated
Nov 8, 2021 (Retired)
Owner
John O'Hanley (johanley)
Contributor
John O'Hanley (johanley)
1
Activity
Badge
Generate
Download
Source code

Date4j is a lightweight replacement for Java's built-in date classes.

  • compiles with JDK 1.5 or greater
  • can be used in Android projects
  • its public API is essentially a single class (DateTime)
  • BSD License

In 2014, improved date classes were finally added to the JDK. Those classes render date4j more or less obsolete.

Documentation is here (the site date4j.net has been shut down):

https://johanley.github.io/date4j/index.html

There's still a use case in which date4j is a good resource. When new languages are created, they all need a way to represent dates and times. As a starting point, one option is to port date4j to the new language. Since date4j consists essentially of a single class, this will not be be an excessively onerous task.

Date4j contributors:

  • John O'Hanley (main author, Canada)
  • Piero Campalani (Italy)
  • Jean-Christophe Garnier (CERN - Switzerland)
  • Jamie Craane (Netherlands)
  • Dan J (USA)