Package org.ctan.site.services
Class DateUtils
java.lang.Object
org.ctan.site.services.DateUtils
The class
DateUtils contains the utilities for dates.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DateTimeFormatterThe fieldLOCAL_DATE_TIME_FORMATTERcontains the formatter forLocalDateTime.static final DateTimeFormatterThe fieldLOCAL_DATE_FORMATTERcontains the formatter forLocalDateTime.static final DateTimeFormatterThe fieldLOCAL_DATE_TIME_FORMATTERcontains the formatter forLocalDateTime.static final DateTimeFormatterThe fieldLOCAL_DATE_TIME_FORMATTER_RFC_3339contains the formatter forLocalDateTimeaccording to RFC3339. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatDate(Instant date) The methodformatDateprovides means to format a date according to contains the ISO date format without the time.static StringformatDate(LocalDateTime date) The methodformatDateprovides means to format a date according to contains the ISO date format without the time.static StringformatDateTime(long date) The methodformatDateTimeprovides means to format a date according to contains the ISO date format including the time.static StringformatDateTime(Instant date) The methodformatDateTimeprovides means to format a date according to contains the ISO date format including the time.static StringformatDateTime(LocalDateTime date) The methodformatDateTimeprovides means to format a date according to contains the ISO date format including the time.static StringformatFullDateTime(Instant instant) The methodformatFullDateTimeprovides means to format a date according to contains the full ISO date format including the time.static StringformatRfc3339(Instant date) The methodformatRfc3339provides means to format a date according to contains the ISO date format including the time.
-
Field Details
-
LOCAL_DATE_TIME_FORMATTER
The fieldLOCAL_DATE_TIME_FORMATTERcontains the formatter forLocalDateTime. -
DATE_TIME_FORMATTER
The fieldLOCAL_DATE_TIME_FORMATTERcontains the formatter forLocalDateTime. -
LOCAL_DATE_TIME_FORMATTER_RFC_3339
The fieldLOCAL_DATE_TIME_FORMATTER_RFC_3339contains the formatter forLocalDateTimeaccording to RFC3339. -
LOCAL_DATE_FORMATTER
The fieldLOCAL_DATE_FORMATTERcontains the formatter forLocalDateTime.
-
-
Method Details
-
formatDate
The methodformatDateprovides means to format a date according to contains the ISO date format without the time.- Parameters:
date- the date- Returns:
- the formatted date
-
formatDate
The methodformatDateprovides means to format a date according to contains the ISO date format without the time.- Parameters:
date- the date- Returns:
- the formatted date
-
formatDateTime
The methodformatDateTimeprovides means to format a date according to contains the ISO date format including the time.- Parameters:
date- the date- Returns:
- the formatted date
-
formatDateTime
The methodformatDateTimeprovides means to format a date according to contains the ISO date format including the time.- Parameters:
date- the date- Returns:
- the formatted date
-
formatDateTime
The methodformatDateTimeprovides means to format a date according to contains the ISO date format including the time.- Parameters:
date- the date- Returns:
- the formatted date
-
formatFullDateTime
The methodformatFullDateTimeprovides means to format a date according to contains the full ISO date format including the time.- Parameters:
instant- the date- Returns:
- the formatted date
-
formatRfc3339
The methodformatRfc3339provides means to format a date according to contains the ISO date format including the time.- Parameters:
date- the date- Returns:
- the formatted date
-