public class RFC3339Date extends BaseBean implements Comparable<RFC3339Date>
| Constructor and Description |
|---|
RFC3339Date() |
RFC3339Date(Date date)
Parameterized Constructor
|
RFC3339Date(long date)
Parameterized Constructor
|
RFC3339Date(String dateStr)
Parameterized Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(RFC3339Date o) |
Date |
getDate()
Returns the date object.
|
Date |
getFormattedDate(String startDateStr)
Utility method to format a string in date
|
static String |
getFormattedDateStr(Date startDate)
Utility method to format a date in string using UTC
|
String |
toString() |
public RFC3339Date()
public RFC3339Date(String dateStr) throws ParseException
dateStr - date string to parseParseException - parse errorpublic RFC3339Date(long date)
date - date in milliseconds since epoch formatpublic RFC3339Date(Date date)
date - java date objectpublic Date getDate()
public Date getFormattedDate(String startDateStr) throws ParseException
startDateStr - date string to parseParseException - on parsing errorpublic static String getFormattedDateStr(Date startDate)
startDate - java date objectpublic int compareTo(RFC3339Date o)
compareTo in interface Comparable<RFC3339Date>Copyright © 2018. All rights reserved.