Class DateRange
- java.lang.Object
-
- com.infinitekind.moneydance.model.DateRange
-
public class DateRange extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(long date)
boolean
contains(DateRange dateRange)
boolean
contains(java.util.Date date)
boolean
containsInt(int date)
boolean
equals(java.lang.Object obj)
java.lang.String
format(CustomDateFormat dateFormat)
int
getEndDateInt()
int
getNumDays()
float
getNumMonths()
float
getNumQuarters()
float
getNumWeeks()
float
getNumYears()
int
getStartDateInt()
int
hashCode()
DateRange
intersect(DateRange otherRange)
Return the intersection of this date range and the given date rangestatic void
main(java.lang.String[] argv)
boolean
overlap(DateRange other)
Returns true if: this ∍ otherStart || this ∍ otherEnd || other ∍ thisStart || other ∍ thisEndstatic DateRange
rangeOfTxns(TransactionSet txns)
Return the smallest date range that includes all of the transactions in the given setstatic DateRange
rangeOfTxns(java.lang.Iterable<AbstractTxn> txns)
Return the smallest date range that includes all of the transactions in the given setjava.lang.String
toString()
-
-
-
Method Detail
-
getNumDays
public int getNumDays()
-
getNumMonths
public final float getNumMonths()
-
getNumWeeks
public final float getNumWeeks()
-
getNumQuarters
public final float getNumQuarters()
-
getNumYears
public final float getNumYears()
-
contains
public final boolean contains(java.util.Date date)
-
contains
public final boolean contains(DateRange dateRange)
-
contains
public final boolean contains(long date)
-
containsInt
public final boolean containsInt(int date)
-
intersect
public final DateRange intersect(DateRange otherRange)
Return the intersection of this date range and the given date range
-
getEndDateInt
public final int getEndDateInt()
-
getStartDateInt
public final int getStartDateInt()
-
format
public final java.lang.String format(CustomDateFormat dateFormat)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
rangeOfTxns
public static DateRange rangeOfTxns(TransactionSet txns)
Return the smallest date range that includes all of the transactions in the given set
-
rangeOfTxns
public static DateRange rangeOfTxns(java.lang.Iterable<AbstractTxn> txns)
Return the smallest date range that includes all of the transactions in the given set
-
main
public static void main(java.lang.String[] argv) throws java.lang.Exception
- Throws:
java.lang.Exception
-
overlap
public boolean overlap(DateRange other)
Returns true if: this ∍ otherStart || this ∍ otherEnd || other ∍ thisStart || other ∍ thisEnd- Parameters:
other
-- Returns:
-
-