Package br.ufsc.labsec.utils
Class DateFormats
java.lang.Object
br.ufsc.labsec.utils.DateFormats
public class DateFormats extends Object
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.lang3.time.FastDateFormat
DMY_DATE_FORMAT
Formato: dd/MM/yyyystatic org.apache.commons.lang3.time.FastDateFormat
DMY_DATE_FORMAT_NO_SLASH
Formato: ddMMyyyystatic org.apache.commons.lang3.time.FastDateFormat
GMT_DATE_TIME_FORMAT
Formato: yyyy-MM-dd'T'HH:mm:ssstatic org.apache.commons.lang3.time.FastDateFormat
GMT_YODA_TIME_FORMAT
Formato: yyyy-MM-dd HH:mm:ssstatic org.apache.commons.lang3.time.FastDateFormat
ISO_DATE_FORMAT
Formato: yyyy-MM-ddstatic org.apache.commons.lang3.time.FastDateFormat
ISO_DATE_FORMAT_NO_SLASH
Formato: yyyyMMddstatic org.apache.commons.lang3.time.FastDateFormat
LPA_ASN1_DATE_FORMAT
Formato: yyyyMMddHHmmssstatic org.apache.commons.lang3.time.FastDateFormat
LPA_ASN1_SHORT_DATE_FORMAT
Formato: yyMMddHHmmssstatic org.apache.commons.lang3.time.FastDateFormat
REPORT_DATE_FORMAT
Formato: dd/MM/yyyy HH:mm:ss zzzstatic org.apache.commons.lang3.time.FastDateFormat
TIMESTAMP_FORMAT
Formato: dd/MM/yyyy HH:mm:ss zstatic org.apache.commons.lang3.time.FastDateFormat
UTC_SIGNING_TIME_FORMAT
Formato: yyyy-MM-dd'T'HH:mm:ss'Z' Timezone: UTCstatic org.apache.commons.lang3.time.FastDateFormat
XML_DATE_FORMAT
Formato: yyyy-MM-dd'T'HH:mm:ss.SSSstatic org.apache.commons.lang3.time.FastDateFormat
ZIP_DATE_TIME_FORMAT
Formato: yyyy-MM-dd'T'HH:mm:ss.SSSZ -
Constructor Summary
Constructors Constructor Description DateFormats()
-
Method Summary
-
Field Details
-
UTC_SIGNING_TIME_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat UTC_SIGNING_TIME_FORMATFormato: yyyy-MM-dd'T'HH:mm:ss'Z' Timezone: UTC -
REPORT_DATE_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat REPORT_DATE_FORMATFormato: dd/MM/yyyy HH:mm:ss zzz -
ISO_DATE_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat ISO_DATE_FORMATFormato: yyyy-MM-dd -
ISO_DATE_FORMAT_NO_SLASH
public static final org.apache.commons.lang3.time.FastDateFormat ISO_DATE_FORMAT_NO_SLASHFormato: yyyyMMdd -
ZIP_DATE_TIME_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat ZIP_DATE_TIME_FORMATFormato: yyyy-MM-dd'T'HH:mm:ss.SSSZ -
GMT_DATE_TIME_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat GMT_DATE_TIME_FORMATFormato: yyyy-MM-dd'T'HH:mm:ss -
GMT_YODA_TIME_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat GMT_YODA_TIME_FORMATFormato: yyyy-MM-dd HH:mm:ss -
XML_DATE_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat XML_DATE_FORMATFormato: yyyy-MM-dd'T'HH:mm:ss.SSS -
TIMESTAMP_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat TIMESTAMP_FORMATFormato: dd/MM/yyyy HH:mm:ss z -
LPA_ASN1_DATE_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat LPA_ASN1_DATE_FORMATFormato: yyyyMMddHHmmss -
LPA_ASN1_SHORT_DATE_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat LPA_ASN1_SHORT_DATE_FORMATFormato: yyMMddHHmmss -
DMY_DATE_FORMAT
public static final org.apache.commons.lang3.time.FastDateFormat DMY_DATE_FORMATFormato: dd/MM/yyyy -
DMY_DATE_FORMAT_NO_SLASH
public static final org.apache.commons.lang3.time.FastDateFormat DMY_DATE_FORMAT_NO_SLASHFormato: ddMMyyyy
-
-
Constructor Details
-
DateFormats
public DateFormats()
-
-
Method Details
-
parse
public static Date parse(String date, org.apache.commons.lang3.time.FastDateFormat... formatsOptions) throws ParseExceptionTentar fazer o parsing da data com os formatos especificados- Parameters:
date
- A data a ser parseadaformatsOptions
- Os formatos a serem usados- Returns:
- A data ou Optional.empty() caso nenhum formato tenha funcionado
- Throws:
ParseException
-