io.lamma

Date

case class Date(yyyy: Int, mm: Int, dd: Int) extends Ordered[Date] with WeekOps with MonthOps with YearOps with Product with Serializable

immutable object to represent a Date. All mutating operations will return a new Date.

Linear Supertypes
Serializable, Serializable, Product, Equals, YearOps, MonthOps, WeekOps, Ordered[Date], Comparable[Date], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Date
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. YearOps
  7. MonthOps
  8. WeekOps
  9. Ordered
  10. Comparable
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Date(yyyy: Int, mm: Int, dd: Int)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(d: Duration): Date

    Returns a copy of this Date plus the specified duration.

    Returns a copy of this Date plus the specified duration.
    dot or bracket is required to prevent confusing compiler. For example:

    Date(2014, 5, 5) + (5 weeks)
    Date(2014, 5, 5) + 5.weeks
    Date(2014, 5, 5) + (2 years)
    Date(2014, 5, 5) + 2.years

    Following lines are identical:

    Date(2014, 5, 5) + 5
    Date(2014, 5, 5) - -5
    Date(2014, 5, 5) + 5.days
    Date(2014, 5, 5) + (5 days)
    Date(2014, 5, 5) - -5.days
    Date(2014, 5, 5) - (-5 days)
    Date(2014, 5, 5).plusDays(5)   // Java friendly
    Date(2014, 5, 5).minusDays(-5) // Java friendly
    d

    duration to add, may be negative

    returns

    new Date object plus the increased duration

  5. def +(n: Int): Date

    Returns a copy of this Date plus the specified number of days.

    Returns a copy of this Date plus the specified number of days.
    Following lines are identical:

    Date(2014, 5, 5) + 5
    Date(2014, 5, 5) - -5
    Date(2014, 5, 5) + 5.days
    Date(2014, 5, 5) + (5 days)
    Date(2014, 5, 5) - -5.days
    Date(2014, 5, 5) - (-5 days)
    Date(2014, 5, 5).plusDays(5)   // Java friendly
    Date(2014, 5, 5).minusDays(-5) // Java friendly
    n

    the amount of days to add, may be negative

    returns

    new Date object plus the increased days

  6. def -(that: Date): Int

    calculate the different between this date and that date

    calculate the different between this date and that date

    Date(2014, 5, 5) - Date(2014, 5, 1) => 4
  7. def -(d: Duration): Date

    Returns a copy of this Date minus the specified duration.

    Returns a copy of this Date minus the specified duration.
    dot or bracket is required to prevent confusing compiler. For example:

    Date(2014, 5, 5) - (5 weeks)
    Date(2014, 5, 5) - 5.weeks
    Date(2014, 5, 5) - (2 years)
    Date(2014, 5, 5) - 2.years

    Following lines are identical:

    Date(2014, 5, 5) - 5
    Date(2014, 5, 5) + -5
    Date(2014, 5, 5) - 5.days
    Date(2014, 5, 5) - (5 days)
    Date(2014, 5, 5) + -5.days
    Date(2014, 5, 5) + (-5 days)
    Date(2014, 5, 5).minusDays(5)  // Java friendly
    Date(2014, 5, 5).plusDays(-5)  // Java friendly
    d

    duration to minus, may be positive

    returns

    new Date object minus the decreased duration

  8. def -(n: Int): Date

    Returns a copy of this Date minus the specified number of days.

    Returns a copy of this Date minus the specified number of days.
    Following lines are identical:

    Date(2014, 5, 5) - 5
    Date(2014, 5, 5) + -5
    Date(2014, 5, 5) - 5.days
    Date(2014, 5, 5) - (5 days)
    Date(2014, 5, 5) + -5.days
    Date(2014, 5, 5) + (-5 days)
    Date(2014, 5, 5).minusDays(5)  // Java friendly
    Date(2014, 5, 5).plusDays(-5)  // Java friendly
    n

    the amount of days to minus, may be positive

    returns

    new Date object minus the decreased days

  9. def <(that: Date): Boolean

    Definition Classes
    Ordered
  10. def <=(that: Date): Boolean

    Definition Classes
    Ordered
  11. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  13. def >(that: Date): Boolean

    Definition Classes
    Ordered
  14. def >=(that: Date): Boolean

    Definition Classes
    Ordered
  15. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  16. def backward(cal: HolidayRule): Date

    select the date with backward convention for given holiday.

    select the date with backward convention for given holiday.

    See also

    io.lamma.Selector.Backward

  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def compare(that: Date): Int

    Definition Classes
    Date → Ordered
  19. def compareTo(that: Date): Int

    Definition Classes
    Ordered → Comparable
  20. lazy val dayOfMonth: Int

    Definition Classes
    MonthOps
  21. def dayOfMonthInYear(n: Int, m: Month): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find nth day of specified month in current year.

    For example:

    new Date(2014, 5, 5).dayOfMonthInYear(15, Month.SEPTEMBER);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(15 th day of September)

    in Scala

    Definition Classes
    YearOps
  22. def dayOfNextMonth(dom: DayOfMonth): Date

    day of next month.

    day of next month. A shorthand of

    this + (1 month) dayOfMonth (dom)
    Definition Classes
    MonthOps
  23. def dayOfPreviousMonth(dom: DayOfMonth): Date

    find day-of-month for the previous month.

    find day-of-month for the previous month. A shorthand of

    this - (1 month) withDayOfMonth (dom)
    Definition Classes
    MonthOps
  24. lazy val dayOfWeek: DayOfWeek

    Definition Classes
    WeekOps
  25. def dayOfWeekInMonth(n: Int, dow: DayOfWeek): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfMonth directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfMonth directly.

    Find nth occurrence of day-of-week in current month.

    For example:

    new Date(2014, 5, 5).dayOfWeekInMonth(3, DayOfWeek.FRIDAY);

    which is identical to

    Date(2014, 5, 5).withDayOfMonth(3 rd Friday)

    in Scala

    n

    ordinal of the month, from 1 to 5

    dow

    DayOfWeek

    returns

    a new copy of the date

    Definition Classes
    MonthOps
  26. def dayOfWeekInYear(n: Int, dow: DayOfWeek, m: Month): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find nth occurrence of day-of-week of specified month in current year.

    For example:

    new Date(2014, 5, 5).dayOfWeekInYear(2, DayOfWeek.FRIDAY, Month.SEPTEMBER);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(2 nd Friday of September)

    in Scala

    Definition Classes
    YearOps
  27. def dayOfWeekInYear(n: Int, dow: DayOfWeek): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find nth occurrence of day-of-week in current year.

    For example:

    new Date(2014, 5, 5).dayOfWeekInYear(3, DayOfWeek.FRIDAY);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(3 rd Friday)

    in Scala

    Definition Classes
    YearOps
  28. lazy val dayOfYear: Int

    Definition Classes
    YearOps
  29. lazy val daysOfMonth: DateRangeBuilder

    an iterable for every day in the month

    an iterable for every day in the month

    Definition Classes
    MonthOps
  30. lazy val daysOfMonth4j: Iterable[Date]

    Java Friendly. It is recommended to use daysOfMonth for Scala.

    Java Friendly. It is recommended to use daysOfMonth for Scala.

    an iterable for every day in the month

    Definition Classes
    MonthOps
  31. lazy val daysOfWeek: DateRangeBuilder

    an iterable for every day in this week
    (week starts on Monday and ends on Sunday according to ISO 8601: http://en.

    an iterable for every day in this week
    (week starts on Monday and ends on Sunday according to ISO 8601: http://en.wikipedia.org/wiki/ISO_week_date)

    Definition Classes
    WeekOps
  32. lazy val daysOfWeek4j: Iterable[Date]

    Java Friendly. It is recommended to use daysOfWeek for Scala.

    Java Friendly. It is recommended to use daysOfWeek for Scala.

    an iterable for every day in this week
    (week starts on Monday and ends on Sunday according to ISO 8601: http://en.wikipedia.org/wiki/ISO_week_date)

    Definition Classes
    WeekOps
  33. lazy val daysOfYear: DateRangeBuilder

    an iterable for every day in the year

    an iterable for every day in the year

    Definition Classes
    YearOps
  34. lazy val daysOfYear4j: Iterable[Date]

    Java Friendly. It is recommended to use daysOfMonth for Scala.

    Java Friendly. It is recommended to use daysOfMonth for Scala.

    an iterable for every day in the year

    Definition Classes
    YearOps
  35. val dd: Int

  36. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  37. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  38. lazy val firstDayOfMonth: Date

    first day of current month

    first day of current month

    Definition Classes
    MonthOps
  39. lazy val firstDayOfNextMonth: Date

    shorthand of

    shorthand of

    dayOfNextMonth(FirstDayOfMonth)
    Definition Classes
    MonthOps
  40. lazy val firstDayOfNextYear: Date

    first day of next year

    first day of next year

    Definition Classes
    YearOps
  41. lazy val firstDayOfPreviousMonth: Date

    shorthand of

    shorthand of

    dayOfPreviousMonth(FirstDayOfMonth)
    Definition Classes
    MonthOps
  42. lazy val firstDayOfPreviousYear: Date

    first day of previous year.

    first day of previous year. This is different from previousFirstDayOfYear

    Definition Classes
    YearOps
  43. lazy val firstDayOfYear: Date

    first day of the year

    first day of the year

    Definition Classes
    YearOps
  44. def firstInMonth(dow: DayOfWeek): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfMonth directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfMonth directly.

    Find first occurrence of day-of-week in current month.

    For example:

    new Date(2014, 5, 5).firstInMonth(DayOfWeek.FRIDAY);

    which is identical to

    Date(2014, 5, 5).withDayOfMonth(1 st Friday)

    in Scala

    Definition Classes
    MonthOps
  45. def firstInYear(m: Month): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find first day of specified month in current year.

    For example:

    new Date(2014, 5, 5).firstInYear(Month.SEPTEMBER);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(1 st day of September)

    in Scala

    Definition Classes
    YearOps
  46. def firstInYear(dow: DayOfWeek, m: Month): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find first occurrence of day-of-week of specified month in current year.

    For example:

    new Date(2014, 5, 5).firstInYear(DayOfWeek.FRIDAY, Month.SEPTEMBER);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(1 st Friday of September)

    in Scala

    Definition Classes
    YearOps
  47. def firstInYear(dow: DayOfWeek): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find first occurrence of day-of-week in current year.

    For example:

    new Date(2014, 5, 5).firstInYear(DayOfWeek.FRIDAY);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(1 st Friday)

    in Scala

    Definition Classes
    YearOps
  48. def forward(cal: HolidayRule): Date

    select the date with forward convention for given holiday.

    select the date with forward convention for given holiday.

    See also

    io.lamma.Selector.Forward

  49. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  50. def is(dow: DayOfWeek): Boolean

    Definition Classes
    WeekOps
  51. def isAfter(that: Date): Boolean

    Java Friendly. It is recommended to use > for Scala.

    Java Friendly. It is recommended to use > for Scala.

  52. def isBefore(that: Date): Boolean

    Java Friendly. It is recommended to use < for Scala.

    Java Friendly. It is recommended to use < for Scala.

  53. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  54. lazy val isLastDayOfMonth: Boolean

    Definition Classes
    MonthOps
  55. lazy val isLastDayOfYear: Boolean

    Definition Classes
    YearOps
  56. def isOnOrAfter(that: Date): Boolean

    Java Friendly. It is recommended to use >= for Scala.

    Java Friendly. It is recommended to use >= for Scala.

  57. def isOnOrBefore(that: Date): Boolean

    Java Friendly. It is recommended to use <= for Scala.

    Java Friendly. It is recommended to use <= for Scala.

  58. def isWeekend: Boolean

    Definition Classes
    WeekOps
  59. lazy val lastDayOfMonth: Date

    last day of the month, different month end and leap month are handled properly

    last day of the month, different month end and leap month are handled properly

    Definition Classes
    MonthOps
  60. lazy val lastDayOfNextMonth: Date

    shorthand of

    shorthand of

    dayOfNextMonth(LastDayOfMonth)
    Definition Classes
    MonthOps
  61. lazy val lastDayOfNextYear: Date

    last day of next year.

    last day of next year. This is different from nextLastDayOfYear

    Definition Classes
    YearOps
  62. lazy val lastDayOfPreviousMonth: Date

    shorthand of

    shorthand of

    dayOfPreviousMonth(LastDayOfMonth)
    Definition Classes
    MonthOps
  63. lazy val lastDayOfPreviousYear: Date

    last day of previous year

    last day of previous year

    Definition Classes
    YearOps
  64. lazy val lastDayOfYear: Date

    last day of the year

    last day of the year

    Definition Classes
    YearOps
  65. def lastInMonth(dow: DayOfWeek): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfMonth directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfMonth directly.

    Find last occurrence of day-of-week in current month.

    For example:

    new Date(2014, 5, 5).lastInMonth(DayOfWeek.FRIDAY);

    which is identical to

    Date(2014, 5, 5).withDayOfMonth(lastFriday)

    in Scala

    Definition Classes
    MonthOps
  66. def lastInYear(m: Month): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find last day of specified month in current year.

    For example:

    new Date(2014, 5, 5).lastInYear(Month.SEPTEMBER);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(lastDay of September)

    in Scala

    Definition Classes
    YearOps
  67. def lastInYear(dow: DayOfWeek, m: Month): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find last occurrence of day-of-week of specified month in current year.

    For example:

    new Date(2014, 5, 5).lastInYear(DayOfWeek.FRIDAY, Month.SEPTEMBER);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(lastFriday of September)

    in Scala

    Definition Classes
    YearOps
  68. def lastInYear(dow: DayOfWeek): Date

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Java Friendly. For Scala, it is recommended to use DSL with withDayOfYear directly.

    Find last occurrence of day-of-week in current year.

    For example:

    new Date(2014, 5, 5).lastInYear(DayOfWeek.FRIDAY);

    which is identical to

    Date(2014, 5, 5).withDayOfYear(lastFriday)

    in Scala

    Definition Classes
    YearOps
  69. lazy val maxDayOfMonth: Int

    max day of this month, different month lengths and leap month are considered

    max day of this month, different month lengths and leap month are considered

    Definition Classes
    MonthOps
  70. lazy val maxDayOfYear: Int

    max day of this year, leap year is considered

    max day of this year, leap year is considered

    Definition Classes
    YearOps
  71. def minus(that: Date): Int

    Java Friendly. it is recommended to use - for Scala.

    Java Friendly. it is recommended to use - for Scala.

    calculate the different between this date and that date

    new Date(2014, 5, 5).minus(new Date(2014, 5, 1)) => 4
  72. def minusDays(n: Int): Date

    Java Friendly. it is recommended to use - for Scala.

    Java Friendly. it is recommended to use - for Scala.

    Returns a copy of this Date minus the specified number of days.
    Following lines are identical:

    new Date(2014, 5, 5).minusDays(5);
    new Date(2014, 5, 5).plusDays(-5);
    n

    the amount of days to minus, may be positive

    returns

    new Date object minus the decreased days

  73. def minusMonths(n: Int): Date

    Java Friendly. it is recommended to use - for Scala.

    Java Friendly. it is recommended to use - for Scala.

    Returns a copy of this Date minus the specified number of months.
    Following lines are identical:

    new Date(2014, 5, 5).minusMonths(5);
    new Date(2014, 5, 5).minusMonths(-5);
    n

    the amount of months to minus, may be positive

    returns

    new Date object minus the decreased months

  74. def minusWeeks(n: Int): Date

    Java Friendly. it is recommended to use - for Scala.

    Java Friendly. it is recommended to use - for Scala.

    Returns a copy of this Date minus the specified number of weeks.
    Following lines are identical:

    new Date(2014, 5, 5).minusWeeks(5);
    new Date(2014, 5, 5).minusWeeks(-5);
    n

    the amount of weeks to minus, may be positive

    returns

    new Date object minus the decreased weeks

  75. def minusYears(n: Int): Date

    Java Friendly. it is recommended to use - for Scala.

    Java Friendly. it is recommended to use - for Scala.

    Returns a copy of this Date minus the specified number of years.
    Following lines are identical:

    new Date(2014, 5, 5).minusYears(5);
    new Date(2014, 5, 5).minusYears(-5);
    n

    the amount of years to minus, may be positive

    returns

    new Date object minus the decreased years

  76. val mm: Int

  77. def modifiedFollowing(cal: HolidayRule): Date

    select the date with modified following convention for given holiday.

    select the date with modified following convention for given holiday.

    See also

    io.lamma.Selector.ModifiedFollowing

  78. def modifiedPreceding(cal: HolidayRule): Date

    select the date with modified preceding convention for given holiday.

    select the date with modified preceding convention for given holiday.

    See also

    io.lamma.Selector.ModifiedPreceding

  79. lazy val month: Month

    Definition Classes
    MonthOps
  80. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  81. def next(doy: DayOfYear): Date

    Java Friendly. It is recommended to use nextDayOfYear for Scala.

    Java Friendly. It is recommended to use nextDayOfYear for Scala.

    coming day-of-year excluding this date

    Definition Classes
    YearOps
  82. def next(dom: DayOfMonth): Date

    Java Friendly. It is recommended to use nextDayOfMonth for Scala.

    Java Friendly. It is recommended to use nextDayOfMonth for Scala.

    coming day-of-month excluding this date

    Definition Classes
    MonthOps
  83. def next(dow: DayOfWeek): Date

    return the first occurrence of the specified day-of-week after current date:

    For example:
    Date(2014-07-05).

    return the first occurrence of the specified day-of-week after current date:

    For example:
    Date(2014-07-05).next(Monday) => Date(2014-07-07)
    Date(2014-07-05).next(Saturday) => Date(2014-07-12) // note 2014-07-05 itself is already Saturday

    Definition Classes
    WeekOps
  84. def nextDayOfMonth(dom: DayOfMonth): Date

    This method is an alias of next(DayOfMonth) for Scala to prevent overloading when using DSL.

    This method is an alias of next(DayOfMonth) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).nextDayOfMonth(3 rd Friday)
    Definition Classes
    MonthOps
  85. def nextDayOfYear(doy: DayOfYear): Date

    This method is an alias of next(DayOfYear) for Scala to prevent overloading when using DSL.

    This method is an alias of next(DayOfYear) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).nextDayOfYear(3 rd Friday)
    Definition Classes
    YearOps
  86. lazy val nextFirstDayOfMonth: Date

    shorthand of comingDayOfMonth(FirstDayOfMonth)
    For example:

    shorthand of comingDayOfMonth(FirstDayOfMonth)
    For example:

    Date(2014, 7, 31).comingMonthBegin => Date(2014, 8, 1)
    Date(2014, 8,  1).comingMonthBegin => Date(2014, 9, 1)
    Definition Classes
    MonthOps
  87. lazy val nextFirstDayOfYear: Date

    shorthand of next(FirstDayOfYear)
    For example:
    Date(2014, 8, 2).

    shorthand of next(FirstDayOfYear)
    For example:
    Date(2014, 8, 2).comingYearBegin => Date(2015, 1, 1)
    Date(2015, 1, 1).comingYearBegin => Date(2016, 1, 1)

    Definition Classes
    YearOps
  88. lazy val nextLastDayOfMonth: Date

    shorthand of comingDayOfMonth(LastDayOfMonth)
    For example:

    shorthand of comingDayOfMonth(LastDayOfMonth)
    For example:

    Date(2014, 7, 30).comingMonthEnd => Date(2014, 7, 31)
    Date(2014, 7, 31).comingMonthEnd => Date(2014, 8, 31)

    Note this is different from lastDayOfNextMonth

    Definition Classes
    MonthOps
  89. lazy val nextLastDayOfYear: Date

    shorthand of next(LastDayOfYear).

    shorthand of next(LastDayOfYear). For example:

    Date(2014, 8, 2).comingYearEnd => Date(2014, 12, 31)
    Date(2014, 12, 31).comingYearEnd => Date(2015, 12, 31)

    Note this is different from lastDayOfNextYear

    Definition Classes
    YearOps
  90. def nextOrSame(doy: DayOfYear): Date

    Java Friendly. It is recommended to use nextOrSameDayOfYear for Scala.

    Java Friendly. It is recommended to use nextOrSameDayOfYear for Scala.

    coming day-of-year including this date

    Definition Classes
    YearOps
  91. def nextOrSame(dom: DayOfMonth): Date

    Java Friendly. It is recommended to use nextOrSameDayOfMonth for Scala.

    Java Friendly. It is recommended to use nextOrSameDayOfMonth for Scala.

    coming day-of-month including this date

    Definition Classes
    MonthOps
  92. def nextOrSame(dow: DayOfWeek): Date

    return the first occurrence of the specified day-of-week after current date, unless current date is already on that day.

    return the first occurrence of the specified day-of-week after current date, unless current date is already on that day.
    For example:

    Date(2014-07-05).nextOrSame(Monday) => Date(2014-07-07)
    Date(2014-07-05).nextOrSame(Saturday) => Date(2014-07-5) // note 2014-07-05 itself is already Saturday


    Definition Classes
    WeekOps
  93. def nextOrSameDayOfMonth(dom: DayOfMonth): Date

    This method is an alias of nextOrSame(DayOfMonth) for Scala to prevent overloading when using DSL.

    This method is an alias of nextOrSame(DayOfMonth) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).nextOrSameDayOfMonth(3 rd Friday)
    Definition Classes
    MonthOps
  94. def nextOrSameDayOfYear(doy: DayOfYear): Date

    This method is an alias of nextOrSame(DayOfYear) for Scala to prevent overloading when using DSL.

    This method is an alias of nextOrSame(DayOfYear) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).nextOrSameDayOfYear(3 rd Friday)
    Definition Classes
    YearOps
  95. final def notify(): Unit

    Definition Classes
    AnyRef
  96. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  97. def plusDays(n: Int): Date

    Java Friendly. it is recommended to use + for Scala.

    Java Friendly. it is recommended to use + for Scala.

    Returns a copy of this Date plus the specified number of days.
    Following lines are identical:

    new Date(2014, 5, 5).plusDays(5);
    new Date(2014, 5, 5).minusDays(-5);
    n

    the amount of days to add, may be negative

    returns

    new Date object plus the increased days

  98. def plusMonths(n: Int): Date

    Java Friendly. it is recommended to use + for Scala.

    Java Friendly. it is recommended to use + for Scala.

    Returns a copy of this Date plus the specified number of months.
    Following lines are identical:

    new Date(2014, 5, 5).plusMonths(5);
    new Date(2014, 5, 5).minusMonths(-5);
    n

    the amount of months to add, may be negative

    returns

    new Date object plus the increased months

  99. def plusWeeks(n: Int): Date

    Java Friendly. it is recommended to use + for Scala.

    Java Friendly. it is recommended to use + for Scala.

    Returns a copy of this Date plus the specified number of weeks.
    Following lines are identical:

    new Date(2014, 5, 5).plusWeeks(5);
    new Date(2014, 5, 5).minusWeeks(-5);
    n

    the amount of weeks to add, may be negative

    returns

    new Date object plus the increased weeks

  100. def plusYears(n: Int): Date

    Java Friendly. it is recommended to use + for Scala.

    Java Friendly. it is recommended to use + for Scala.

    Returns a copy of this Date plus the specified number of years.
    Following lines are identical:

    new Date(2014, 5, 5).plusYears(5);
    new Date(2014, 5, 5).minusYears(-5);
    n

    the amount of years to add, may be negative

    returns

    new Date object plus the increased years

  101. def previous(doy: DayOfYear): Date

    Java Friendly. It is recommended to use previousDayOfYear for Scala.

    Java Friendly. It is recommended to use previousDayOfYear for Scala.

    past day-of-year excluding this date

    Definition Classes
    YearOps
  102. def previous(dom: DayOfMonth): Date

    Java Friendly. It is recommended to use previousDayOfMonth for Scala.

    Java Friendly. It is recommended to use previousDayOfMonth for Scala.

    past day-of-month excluding this date

    Definition Classes
    MonthOps
  103. def previous(dow: DayOfWeek): Date

    previous day-of-week excluding this date.

    previous day-of-week excluding this date. For example:

    Date(2014-07-05).previous(Monday) => Date(2014-06-30) <br>
    Date(2014-07-05).previous(Saturday) => Date(2014-06-28) // note 2014-07-05 itself is already Saturday 
    Definition Classes
    WeekOps
  104. def previousDayOfMonth(dom: DayOfMonth): Date

    This method is an alias of previous(DayOfMonth) for Scala to prevent overloading when using DSL.

    This method is an alias of previous(DayOfMonth) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).previousDayOfMonth(3 rd Friday)
    Definition Classes
    MonthOps
  105. def previousDayOfYear(doy: DayOfYear): Date

    This method is an alias of previous(DayOfYear) for Scala to prevent overloading when using DSL.

    This method is an alias of previous(DayOfYear) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).previousDayOfYear(3 rd Friday)
    Definition Classes
    YearOps
  106. lazy val previousFirstDayOfMonth: Date

    shorthand of pastDayOfMonth(FirstDayOfMonth)
    For example:

    shorthand of pastDayOfMonth(FirstDayOfMonth)
    For example:

    Date(2014, 8, 2).pastMonthBegin => Date(2014, 8, 1)
    Date(2014, 8, 1).pastMonthBegin => Date(2014, 7, 1)

    Note this is different from firstDayOfPreviousMonth

    Definition Classes
    MonthOps
  107. lazy val previousFirstDayOfYear: Date

    shorthand of previous(FirstDayOfYear).

    shorthand of previous(FirstDayOfYear). For example:

    Date(2014, 8, 2).previousFirstDayOfYear => Date(2014, 1, 1)
    Date(2014, 1, 1).previousFirstDayOfYear => Date(2013, 1, 1)

    Note this is different from firstDayOfPreviousYear

    Definition Classes
    YearOps
  108. lazy val previousLastDayOfMonth: Date

    shorthand of pastDayOfMonth(LastDayOfMonth)
    For example:

    shorthand of pastDayOfMonth(LastDayOfMonth)
    For example:

    Date(2014, 8, 5).pastMonthEnd => Date(2014, 7, 31)
    Date(2014, 7, 31).pastMonthEnd => Date(2014, 6, 30)
    Definition Classes
    MonthOps
  109. lazy val previousLastDayOfYear: Date

    shorthand of previous(LastDayOfYear)
    For example:
    Date(2014, 8, 2).

    shorthand of previous(LastDayOfYear)
    For example:
    Date(2014, 8, 2).previousLastDayOfYear => Date(2013, 12, 31)
    Date(2013, 12, 31).previousLastDayOfYear => Date(2012, 12, 31)

    Definition Classes
    YearOps
  110. def previousOrSame(doy: DayOfYear): Date

    Java Friendly. It is recommended to use previousOrSameDayOfYear for Scala.

    Java Friendly. It is recommended to use previousOrSameDayOfYear for Scala.

    past day-of-year including this date

    Definition Classes
    YearOps
  111. def previousOrSame(dom: DayOfMonth): Date

    Java Friendly. It is recommended to use previousOrSameDayOfMonth for Scala.

    Java Friendly. It is recommended to use previousOrSameDayOfMonth for Scala.

    past day-of-month including this date

    Definition Classes
    MonthOps
  112. def previousOrSame(dow: DayOfWeek): Date

    previous day of week before current date, unless current date is already on specified day-of-week

    previous day of week before current date, unless current date is already on specified day-of-week

    For example:

    Date(2014-07-05).previousOrSame(Monday) => Date(2014-06-30)
    Date(2014-07-05).previousOrSame(Saturday) => Date(2014-07-05) // note 2014-07-05 itself is already Saturday
    Definition Classes
    WeekOps
  113. def previousOrSameDayOfMonth(dom: DayOfMonth): Date

    This method is an alias of previousOrSame(DayOfMonth) for Scala to prevent overloading when using DSL.

    This method is an alias of previousOrSame(DayOfMonth) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).previousOrSameDayOfMonth(3 rd Friday)
    Definition Classes
    MonthOps
  114. def previousOrSameDayOfYear(doy: DayOfYear): Date

    This method is an alias of previousOrSame(DayOfYear) for Scala to prevent overloading when using DSL.

    This method is an alias of previousOrSame(DayOfYear) for Scala to prevent overloading when using DSL.

    Usage example:

    Date(2014, 5, 5).previousOrSameDayOfYear(3 rd Friday)
    Definition Classes
    YearOps
  115. lazy val sameWeekdaysOfMonth: List[Date]

    Every day in the same month with same dow
    eg, if this.

    Every day in the same month with same dow
    eg, if this.dayOfWeek == Wednesday, then this is a list of all Wednesday in the same month

    Definition Classes
    MonthOps
  116. lazy val sameWeekdaysOfMonth4j: List[Date]

    Java Friendly. It is recommended to use sameWeekdaysOfMonth for Scala.

    Java Friendly. It is recommended to use sameWeekdaysOfMonth for Scala.

    Every day in the same month with same dow
    eg, if this.dayOfWeek == Wednesday, then this is a list of all Wednesday in the same month

    Definition Classes
    MonthOps
  117. lazy val sameWeekdaysOfYear: List[Date]

    Every day in the same year with same dow
    eg, if this.

    Every day in the same year with same dow
    eg, if this.dayOfWeek == Wednesday, then this is a list of all Wednesday in the same year

    Definition Classes
    YearOps
  118. lazy val sameWeekdaysOfYear4j: List[Date]

    Java Friendly. It is recommended to use sameWeekdaysOfYear for Scala.

    Java Friendly. It is recommended to use sameWeekdaysOfYear for Scala.

    Every day in the same year with same dow
    eg, if this.dayOfWeek == Wednesday, then this is a list of all Wednesday in the same year

    Definition Classes
    YearOps
  119. def select(selector: Selector): Date

  120. def shift(shifter: Shifter): Date

  121. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  122. def to(yyyy: Int, mm: Int, dd: Int): DateRangeBuilder

  123. def to(isoRepr: String): DateRangeBuilder

  124. def to(that: Date): DateRangeBuilder

    generate a DateRange iterable, which can be used similar as scala.

    generate a DateRange iterable, which can be used similar as scala.collection.immutable.Range. eg,
    both this date and that date included
    for (d <- Date(2014, 5, 5) to Date(2014, 5, 10)) println(d)

  125. lazy val toISOString: String

    standard ISO string in yyyy-mm-dd.

    standard ISO string in yyyy-mm-dd. eg, 2014-05-23 or 2014-11-02

  126. def until(yyyy: Int, mm: Int, dd: Int): DateRangeBuilder

  127. def until(isoRepr: String): DateRangeBuilder

  128. def until(that: Date): DateRangeBuilder

    generate a DateRange iterable, which can be used similar as scala.

    generate a DateRange iterable, which can be used similar as scala.collection.immutable.Range. eg,
    this date is included but that date isn't
    for (d <- Date(2014, 5, 5) until Date(2014, 5, 10)) println(d)

  129. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  130. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  131. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  132. def withDayOfMonth(dom: DayOfMonth): Date

    find the day of this month matching specified day-of-month.

    find the day of this month matching specified day-of-month. DSL can be used directly.

    Usage example:

    Date(2014, 5, 5).withDayOfMonth(lastDay)
    Date(2014, 5, 5).withDayOfMonth(3 rd Friday)
    Date(2014, 5, 5).withDayOfMonth(20 th day)
    Definition Classes
    MonthOps
  133. def withDayOfWeek(dow: DayOfWeek): Date

    find the day of this week matching specified day-of-week

    find the day of this week matching specified day-of-week

    A week starts with Monday according to ISO8601 http://en.wikipedia.org/wiki/ISO_week_date

    Definition Classes
    WeekOps
  134. def withDayOfYear(doy: DayOfYear): Date

    find the day of this year matching specified day-of-month.

    find the day of this year matching specified day-of-month. DSL can be used directly.

    Usage example:

    Date(2014, 5, 5).withDayOfYear(lastDay) => Date(2014,12,31)
    Date(2014, 5, 5).withDayOfYear(3 rd Friday) => Date(2014,1,17)
    Date(2014, 5, 5).withDayOfYear(20 th day) => Date(2014,1,20)
    Date(2014, 5, 5).withDayOfYear(2 nd Tuesday of September) => Date(2014,9,9)
    Definition Classes
    YearOps
  135. val yyyy: Int

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from YearOps

Inherited from MonthOps

Inherited from WeekOps

Inherited from Ordered[Date]

Inherited from Comparable[Date]

Inherited from AnyRef

Inherited from Any

Ungrouped