Class DateRange

java.lang.Object
com.infinitekind.moneydance.model.DateRange

public class DateRange
extends java.lang.Object
  • Constructor Details

    • DateRange

      public DateRange()
    • DateRange

      public DateRange​(java.util.Date start, java.util.Date end)
    • DateRange

      public DateRange​(int start, int end)
    • DateRange

      public DateRange​(long start, long end)
  • Method Details

    • 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 class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.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: