public class ThreadSafeDateFormatter extends Object
Constructor and Description |
---|
ThreadSafeDateFormatter() |
Modifier and Type | Method and Description |
---|---|
static String |
format(DateFormat dateFormat,
Date date)
This class / method exists because DateFormats are notoriously not thread safe.
|
static Date |
parse(DateFormat dateFormat,
String dateString)
This class / method exists because DateFormats are notoriously not thread safe.
|
public static String format(DateFormat dateFormat, Date date)
dateFormat
- Date format to usedate
- Date to formatpublic static Date parse(DateFormat dateFormat, String dateString) throws ParseException
dateFormat
- Date format to usedateString
- String to parseParseException
- if provided string is not parseableCopyright © 2020 Snowbound Software Corporation. All rights reserved.