public class DateCalculation extends Object
| Constructor and Description |
|---|
DateCalculation(Date givenDate)
Constructor that sets a given date as internal state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
adjustDaysInMonth()
Adjust days in a months.
|
void |
decrementDay()
Decrements a day.
|
void |
decrementHour()
Decrements a hour.
|
void |
decrementMinute()
Decrements a minute.
|
void |
decrementMonth()
Decrements a month.
|
void |
decrementYear()
Decrements a year.
|
String |
formatToRfc3339(Date date,
DateStyle dateStyle,
boolean isLocalTime)
Formats a date according to Rfc3339 spezification
|
String |
formatToRfc3339Timestamp(Date date,
boolean isLocalTime)
Formats a date according to Rfc3339 spezification
|
Date |
getDate()
Convert internal state to a Date.
|
String |
getDay()
Gibt day zurück.
|
int |
getHour()
Gibt hour zurück.
|
int |
getMinute()
Gibt minute zurück.
|
String |
getMonth()
Gibt month zurück.
|
String |
getYear()
Gibt year zurück.
|
void |
incrementDay()
Increments a day.
|
void |
incrementHour()
Increments a hour.
|
void |
incrementMinute()
Increments a minute.
|
void |
incrementMonth()
Increments a month.
|
void |
incrementYear()
Increments a year.
|
Date |
parseRfc3339(String pattern,
DateStyle dateStyle,
boolean isLocalTime)
Will pase a String in Rfc3339 spcification to an Date according teh DateStyle.
|
Date |
parseRfc3339Timestamp(String pattern,
boolean isLocalTime)
Will pase a String in Rfc3339 spcification to an Date as timestamp.
|
void |
setDay(String day)
Sets manually the day.
|
void |
setHour(String hour)
Sets manually the day.
|
void |
setMinute(String minute)
Sets manually the day.
|
void |
setMonth(String month)
Sets manually the day.
|
void |
setYear(String year)
Sets manually the day.
|
public DateCalculation(Date givenDate)
givenDate - the date to setpublic String formatToRfc3339Timestamp(Date date, boolean isLocalTime)
date - the datepublic String formatToRfc3339(Date date, DateStyle dateStyle, boolean isLocalTime)
date - the datepublic Date parseRfc3339Timestamp(String pattern, boolean isLocalTime)
pattern - the patternDpublic Date parseRfc3339(String pattern, DateStyle dateStyle, boolean isLocalTime)
pattern - the patternpublic Date getDate()
public void setDay(String day)
day - the daypublic void setMonth(String month)
month - the monthpublic void setYear(String year)
year - the yearpublic void setHour(String hour)
hour - the hourpublic void setMinute(String minute)
minute - the minutepublic void incrementDay()
public void decrementDay()
public void incrementMonth()
public void decrementMonth()
public void adjustDaysInMonth()
public void incrementYear()
public void decrementYear()
public void incrementMinute()
public void decrementMinute()
public void incrementHour()
public void decrementHour()
public String getDay()
public String getMonth()
public String getYear()
public int getHour()
public int getMinute()
Copyright © 2011–2015 SWM. All rights reserved.