public class DateWorker extends Object
| Constructor and Description |
|---|
DateWorker(String pattern)
Instantiates a new
DateWorker instance based on date pattern
that is used for parsing and formatting dates. |
| Modifier and Type | Method and Description |
|---|---|
static Date |
addBufferDay(Date date)
Add one day to the date.
|
String |
format(Date date)
Format a object of class
Date into an string in the GregorianCalendar. |
Date |
parse(String date)
Parse a string into an object of class
Date in the GregorianCalendar. |
public DateWorker(String pattern)
DateWorker instance based on date pattern
that is used for parsing and formatting dates.pattern - is date patternpublic Date parse(String date) throws ParseException
Date in the GregorianCalendar.date - is date to be parseParseExceptionpublic String format(Date date)
Date into an string in the GregorianCalendar.date - is date to be formatCopyright © 2020. All rights reserved.