public final class DateBuilder extends Object
| Constructor and Description |
|---|
DateBuilder() |
DateBuilder(Calendar calendar) |
DateBuilder(Date date) |
| Modifier and Type | Method and Description |
|---|---|
DateBuilder |
add(TimeUnit unit)
Ajout de TimeUnit a une date.
|
boolean |
after(Calendar dt) |
boolean |
after(Date dt) |
boolean |
after(DateBuilder dt) |
boolean |
before(Calendar dt) |
boolean |
before(Date dt) |
boolean |
before(DateBuilder dt) |
DateBuilder |
clearTime()
Mise a 0 de la partie heure/minutes/secondes/millisecondes de la date.
|
DateBuilder |
endOfDay() |
DateBuilder |
firstDayOfMonth()
Place la date au premier jour du mois.
|
DateBuilder |
firstDayOfNextMonth()
Place la date au premier jour du mois suivant.
|
String |
format(String dateFormat) |
int |
getDayOfMonth() |
int |
getDayOfWeek() |
int |
getHour() |
int |
getHourOfDay() |
int |
getMillisecond() |
int |
getMinute() |
int |
getMonth() |
Months |
getMonths() |
int |
getSecond() |
WeekDays |
getWeekDay() |
int |
getWeekMonth() |
int |
getWeekYear() |
int |
getYear() |
boolean |
isFuture() |
boolean |
isPast() |
boolean |
isSameAs(Calendar calendar)
Checks if calendar object represent the same date and time.
|
boolean |
isSameAs(Date dateToCompare)
Checks if date object represent the same date and time.
|
boolean |
isSameDayAs(Calendar calendar)
Checks if calendar object is on the same day ignoring time.
|
boolean |
isSameDayAs(Date date)
Checks if date object is on the same day ignoring time.
|
boolean |
isSameTimeAs(Calendar calendar)
Checks if calendar object represent the same instant in time.
|
boolean |
isSameTimeAs(Date dateToCompare)
Checks if date object represent the same instant in time.
|
boolean |
isToday() |
boolean |
isWeekend()
methode utilitaire pour determiner si c'est un jour du week end.
|
DateBuilder |
lastDayOfMonth()
Place la date au dernier jour du mois.
|
DateBuilder |
lastDayOfNextMonth()
Place la date au dernier jour du mois suivant.
|
DateBuilder |
setAsEqual(Calendar calendar) |
DateBuilder |
setAsEqual(Date dateExt) |
DateBuilder |
subtract(TimeUnit unit)
Soustraction de timeUnit a une date.
|
Calendar |
toCalendar() |
Date |
toDate() |
String |
toLongStringDate() |
String |
toShortStringDate() |
String |
toString() |
String |
toStringDate() |
DateBuilder |
withDayOfMonth(int day)
seter pour le jours du mois de la date (1..31)
|
DateBuilder |
withDayOfWeek(int day)
seter pour le jours de la semaine de la date (LUNDI/MARDI etc.).
|
DateBuilder |
withDayOfWeek(WeekDays day) |
DateBuilder |
withHour(int hour)
seter pour les heures de la date.
|
DateBuilder |
withHourOfDay(int hour) |
DateBuilder |
withMillisecond(int millisecond)
seter pour les millisecondes de la date.
|
DateBuilder |
withMinute(int minute)
seter pour les minutes de la date.
|
DateBuilder |
withMonth(int month)
seter pour le mois de la date.
|
DateBuilder |
withMonth(Months month) |
DateBuilder |
withSecond(int second)
seter pour les secondes de la date.
|
DateBuilder |
withYear(int year)
seter pour l'ann�e de la date.
|
public DateBuilder()
public DateBuilder(Calendar calendar)
public DateBuilder(Date date)
public DateBuilder add(TimeUnit unit)
unit - TimeUnitpublic DateBuilder clearTime()
public DateBuilder endOfDay()
public DateBuilder firstDayOfMonth()
public DateBuilder firstDayOfNextMonth()
public int getDayOfMonth()
public int getDayOfWeek()
public int getHour()
public int getHourOfDay()
public int getMillisecond()
public int getMinute()
public int getMonth()
public Months getMonths()
public int getSecond()
public WeekDays getWeekDay()
public int getWeekMonth()
public int getWeekYear()
public int getYear()
public boolean isSameAs(Calendar calendar)
calendar - Calendarpublic boolean isSameAs(Date dateToCompare)
date - Datepublic boolean isSameDayAs(Calendar calendar)
calendar - Calendarpublic boolean isSameDayAs(Date date)
date - Datepublic boolean isSameTimeAs(Calendar calendar)
calendar - Calendarpublic boolean isSameTimeAs(Date dateToCompare)
date - Datepublic boolean isWeekend()
public DateBuilder lastDayOfMonth()
public DateBuilder lastDayOfNextMonth()
public DateBuilder setAsEqual(Calendar calendar)
public DateBuilder setAsEqual(Date dateExt)
public DateBuilder subtract(TimeUnit unit)
unit - TimeUnitpublic Calendar toCalendar()
public Date toDate()
public String toLongStringDate()
public String toShortStringDate()
public String toStringDate()
public DateBuilder withDayOfMonth(int day)
dayOfMonth - public DateBuilder withDayOfWeek(int day)
dayOfWeek - public DateBuilder withDayOfWeek(WeekDays day)
public DateBuilder withHour(int hour)
heurs - public DateBuilder withHourOfDay(int hour)
public DateBuilder withMillisecond(int millisecond)
millisecond - public DateBuilder withMinute(int minute)
minutes - public DateBuilder withMonth(int month)
month - public DateBuilder withMonth(Months month)
public DateBuilder withSecond(int second)
second - public DateBuilder withYear(int year)
year - public boolean isFuture()
public boolean isPast()
public boolean before(Calendar dt)
public boolean before(DateBuilder dt)
public boolean before(Date dt)
public boolean after(Calendar dt)
public boolean after(DateBuilder dt)
public boolean after(Date dt)
public boolean isToday()
Copyright © 2014. All Rights Reserved.