ph datetime - phax/ph-commons GitHub Wiki
Extension library for Java date and time handling with formatting, parsing, display and XML conversion utilities.
Highlights:
-
PDTFactory- create date/time objects conveniently -
PDTFormatter/PDTFromString/PDTToString- formatting and parsing with pattern support -
PDTDisplayHelper- user-friendly date/time display (e.g. "2 hours ago") -
PDTWebDateHelper- web-specific date/time handling (RFC 822, XSD, etc.) -
PDTXMLConverter- XML conversion for date/time types -
DateTimeFormatterCache- cachedDateTimeFormatterinstances -
OffsetDate/XMLOffsetDate/XMLOffsetDateTime- timezone-aware date/time types -
LocalDatePeriod/LocalDateTimePeriod- date range handling -
Expirable/ExpiringObject- objects with expiration tracking
Add the following to your pom.xml to use this artifact:
<dependency>
<groupId>com.helger.commons</groupId>
<artifactId>ph-datetime</artifactId>
<version>x.y.z</version>
</dependency>Note: the Maven groupId changed in v10 from com.helger to com.helger.commons