Modifier and Type | Field and Description |
---|---|
static long |
MILLISECONDS_30DAYS |
Constructor and Description |
---|
DateHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
formatDate(java.util.Calendar cal,
java.lang.String pattern)
This method does what the name suggests.
|
static java.lang.String |
formatDate(java.util.Date date,
java.lang.String pattern)
This method does what the name suggests.
|
static java.util.Calendar |
getCalendar(java.lang.String dateValue)
Returns an instance of Calendar for the given date string with the
precision of the date pattern from 'config.properties'.
|
static java.util.Calendar |
getCalendar(java.lang.String dateValue,
java.lang.String pattern)
Returning the calendar for the given date string formatted according to the format pattern.
|
static java.util.Calendar |
getConstantForUndefinedDate()
Returning a date (1970101) as an indicator for an undefined date.
|
static java.util.Calendar |
getCurrentDateWithoutTime()
This method does what the name suggests.
|
public static final long MILLISECONDS_30DAYS
public static java.util.Calendar getCalendar(java.lang.String dateValue) throws java.text.ParseException, com.pdfunit.internal.errors.PDFUnitUnknownDateFormatException
When the date string does not match the date pattern from config.properties, an exception is thrown.
java.text.ParseException
com.pdfunit.internal.errors.PDFUnitUnknownDateFormatException
public static java.util.Calendar getCalendar(java.lang.String dateValue, java.lang.String pattern) throws java.text.ParseException
java.text.ParseException
public static java.util.Calendar getCurrentDateWithoutTime()
public static java.lang.String formatDate(java.util.Calendar cal, java.lang.String pattern)
public static java.lang.String formatDate(java.util.Date date, java.lang.String pattern)
public static java.util.Calendar getConstantForUndefinedDate()
Copyright (C) PDFUnit.com. See here for license.