Class Dates
java.lang.Object
com.github.mjeanroy.junit.servers.commons.lang.Dates
Static date utilities.
Internal API: these methods are part of the internal API and may be removed, have their signature change, or have their access level decreased from public to protected, package, or private in future versions without notice.
-
Method Summary
-
Method Details
-
getTime
Parse date using given pattern and return time value. Note that this method will return null if pattern is not valid or throws aParseException
.- Parameters:
date
- Date.pattern
- Pattern.patterns
- Other pattern to test.- Returns:
- Time value, null if pattern is not valid.
-
format
Format date according to given pattern.- Parameters:
date
- Date.pattern
- Pattern.- Returns:
- Formatted date.
-