|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jaulp.random.date.RandomDateUtils
public class RandomDateUtils
This util class gets random dates.
| Constructor Summary | |
|---|---|
RandomDateUtils()
|
|
| Method Summary | |
|---|---|
static java.util.Date |
createDateInPast(java.util.Date date,
int addiereTage)
Deprecated. Use instead DateUtils.substractDaysFromDate(date, int). |
static java.util.Date |
createFutureDate(java.util.Date date,
int addiereTage)
Deprecated. Use instead DateUtils.addDaysToDate(date, int). |
static java.util.Date |
createRandomBirthday()
Creates a random birthday-date between 9 and 55 years. |
static java.util.Date |
createRandomBirthday(java.util.Date from,
java.util.Date till)
Creates a random birthday-date between the two given date-objects. |
static java.util.Date |
createRandomDate(java.util.Date from)
Creates a random date. |
static java.util.Date |
createRandomDatebetween(java.util.Date start,
java.util.Date end)
Creates a random Date between the range from start and end. |
static java.util.Date |
createRandomDateBetween(java.util.Date from,
int startDays,
int endDays)
Creates a random Date between the range from startDays and endDays from the given Date. |
static java.lang.String |
createRandomDatebetween(long startDate,
long endDate)
Creates a random Date between the range from startDays and endDays from the given Date and gives it back as a string to the default "dd.MM.yyyy HH:mm:ss" format. |
static java.lang.String |
createRandomDatebetween(long startDate,
long endDate,
java.lang.String format)
Creates a random Date between the range from startDays and endDays from the given Date and gives it back as a string to the given format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomDateUtils()
| Method Detail |
|---|
public static java.util.Date createFutureDate(java.util.Date date,
int addiereTage)
date - The Date from where to compute the future date.addiereTage - The days that have to added to the given Date.
public static java.util.Date createDateInPast(java.util.Date date,
int addiereTage)
date - The Date from where to compute the Past date.addiereTage - The days that have to added to the given Date.
public static java.util.Date createRandomDate(java.util.Date from)
from - The date from where to begin.
public static java.util.Date createRandomDatebetween(java.util.Date start,
java.util.Date end)
start - The Date from where the range starts.end - The Date from where the range ends.
public static java.util.Date createRandomDateBetween(java.util.Date from,
int startDays,
int endDays)
from - The Date from where to the random Date to start.startDays - The int that represents the days from where the range starts.endDays - The int that represents the days from where the range ends.
public static java.lang.String createRandomDatebetween(long startDate,
long endDate,
java.lang.String format)
startDate - The date from where to start as a long.endDate - The date from where to end as a long.format - The format for the date.
public static java.lang.String createRandomDatebetween(long startDate,
long endDate)
startDate - The date from where to start as a long.endDate - The date from where to end as a long.
public static java.util.Date createRandomBirthday()
public static java.util.Date createRandomBirthday(java.util.Date from,
java.util.Date till)
from - The date from where to start.till - The date from where to end.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||