public class Period
extends java.lang.Object
Constructor and Description |
---|
Period(java.util.Date anotherDate)
Constructs a new period between now and another date matter which sequence.
|
Period(java.util.Date oneDate,
java.util.Date anotherDate)
Constructs a new period between two dates no matter which sequence.
|
Period(java.sql.Date oneDate,
java.sql.Date anotherDate)
Constructs a new period between two dates no matter which sequence.
|
Period(long oneDate,
long anotherDate)
Constructs a new period between two dates no matter which sequence.
|
Modifier and Type | Method and Description |
---|---|
boolean |
overlapWith(int dayOfWeekBeg,
TimeOfDay timeBeg,
int dayOfWeekEnd,
TimeOfDay timeEnd)
Returns true if this period overlaps with a weekly period definition.
|
boolean |
overlapWith(Period period)
Returns true if this period overlaps with the specified period.
|
public Period(java.util.Date anotherDate)
anotherDate
- another datepublic Period(java.util.Date oneDate, java.util.Date anotherDate)
oneDate
- one dateanotherDate
- another datepublic Period(java.sql.Date oneDate, java.sql.Date anotherDate)
oneDate
- one dateanotherDate
- another datepublic Period(long oneDate, long anotherDate)
oneDate
- one dateanotherDate
- another datepublic boolean overlapWith(Period period)
period
- the other period to check on overlappingpublic boolean overlapWith(int dayOfWeekBeg, TimeOfDay timeBeg, int dayOfWeekEnd, TimeOfDay timeEnd)
dayOfWeekBeg
- the begin day of the weekly definition, see Calendar.MONDAY ...timeBeg
- the begin timedayOfWeekEnd
- the end day of the weekly definition, see Calendar.MONDAY ...timeEnd
- the end timeCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de