public final class DumbCalendar.DateRange extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
org.joda.time.Instant |
from
The start date, inclusive.
|
org.joda.time.Instant |
to
The end date, inclusive.
|
Constructor and Description |
---|
DateRange(Date from,
Date to)
Creates a new date range
|
Modifier and Type | Method and Description |
---|---|
DumbCalendar.DateRange |
expandToMonthly()
Creates a new instance which represent an expansion
of the current date range to a month.
|
DumbCalendar.DateRange |
expandToWeekly()
Creates a week date range based on the middle date
of this date range.
|
DumbCalendar.DateRange |
getDailyRange(Date day)
Returns a date range which spans over a single day.
|
org.joda.time.Duration |
getDuration()
The range duration, 0 or greater.
|
Date |
getMiddleDate()
Returns the middle (or the center) date shown in the calendarWrapper.
|
DumbCalendar.DateRange |
getMonthlyRange(Date dayInMonth)
Returns a range which spans over a single month.
|
DumbCalendar.DateRange |
getToday()
Returns a date range which contains TODAY.
|
DumbCalendar.DateRange |
getWeeklyRange(Date dayInWeek)
Returns a date range which spans over a single week.
|
boolean |
isDailyMode()
True if this calendar shows a single day.
|
boolean |
isMonthlyMode()
True if this calendar shows an entire month..
|
boolean |
isWeeklyMode()
True if this calendarWrapper shows a single week.
|
public final org.joda.time.Instant from
public final org.joda.time.Instant to
from
.public org.joda.time.Duration getDuration()
public boolean isMonthlyMode()
public boolean isDailyMode()
public boolean isWeeklyMode()
public Date getMiddleDate()
public DumbCalendar.DateRange getWeeklyRange(Date dayInWeek)
dayInWeek
- returns week containing this day, not null.public DumbCalendar.DateRange getDailyRange(Date day)
day
- the day to show, not null.public DumbCalendar.DateRange getMonthlyRange(Date dayInMonth)
dayInMonth
- returns range containing this day, not null.public DumbCalendar.DateRange getToday()
public DumbCalendar.DateRange expandToMonthly()
public DumbCalendar.DateRange expandToWeekly()
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.