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: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. 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

  4. 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

  5. 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
  6. 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

  7. 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

  8. def <(that: Date): Boolean

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

    Definition Classes
    Ordered
  10. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def >(that: Date): Boolean

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

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

    Definition Classes
    Any
  14. 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

  15. def clone(): AnyRef

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

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

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

    Definition Classes
    MonthOps
  19. 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
  20. def dayOfNextMonth(dom: DayOfMonth): Date

    day of next month.

    day of next month. A shorthand of

    this + (1 month) dayOfMonth (dom)
    Definition Classes
    MonthOps
  21. 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
  22. lazy val dayOfWeek: DayOfWeek

    Definition Classes
    WeekOps
  23. 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
  24. 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
  25. 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
  26. lazy val dayOfYear: Int

    Definition Classes
    YearOps
  27. lazy val daysOfMonth: DateRangeBuilder

    an iterable for every day in the month

    an iterable for every day in the month

    Definition Classes
    MonthOps
  28. 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
  29. 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
  30. 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
  31. lazy val daysOfYear: DateRangeBuilder

    an iterable for every day in the year

    an iterable for every day in the year

    Definition Classes
    YearOps
  32. 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
  33. val dd: Int

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

    Definition Classes
    AnyRef
  35. def finalize(): Unit

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

    first day of current month

    first day of current month

    Definition Classes
    MonthOps
  37. lazy val firstDayOfNextMonth: Date

    shorthand of

    shorthand of

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

    first day of next year

    first day of next year

    Definition Classes
    YearOps
  39. lazy val firstDayOfPreviousMonth: Date

    shorthand of

    shorthand of

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

    first day of previous year.

    first day of previous year. This is different from previousFirstDayOfYear

    Definition Classes
    YearOps
  41. lazy val firstDayOfYear: Date

    first day of the year

    first day of the year

    Definition Classes
    YearOps
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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

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

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

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

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

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

  50. def isBefore(that: Date): Boolean

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

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

  51. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  52. lazy val isLastDayOfMonth: Boolean

    Definition Classes
    MonthOps
  53. lazy val isLastDayOfYear: Boolean

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

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

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

  55. def isOnOrBefore(that: Date): Boolean

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

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

  56. def isWeekend: Boolean

    Definition Classes
    WeekOps
  57. 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
  58. lazy val lastDayOfNextMonth: Date

    shorthand of

    shorthand of

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

    last day of next year.

    last day of next year. This is different from nextLastDayOfYear

    Definition Classes
    YearOps
  60. lazy val lastDayOfPreviousMonth: Date

    shorthand of

    shorthand of

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

    last day of previous year

    last day of previous year

    Definition Classes
    YearOps
  62. lazy val lastDayOfYear: Date

    last day of the year

    last day of the year

    Definition Classes
    YearOps
  63. 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
  64. 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
  65. 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
  66. 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
  67. 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
  68. 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
  69. 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
  70. 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

  71. 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

  72. 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

  73. 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

  74. val mm: Int

  75. 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

  76. 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

  77. lazy val month: Month

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

    Definition Classes
    AnyRef
  79. 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
  80. 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
  81. 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
  82. 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
  83. 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
  84. 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
  85. 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
  86. 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
  87. 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
  88. 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
  89. 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
  90. 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
  91. 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
  92. 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
  93. final def notify(): Unit

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

    Definition Classes
    AnyRef
  95. 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

  96. 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

  97. 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

  98. 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

  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. 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
  108. 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
  109. 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
  110. 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
  111. 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
  112. 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
  113. 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
  114. 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
  115. 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
  116. 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
  117. def select(selector: Selector): Date

  118. def shift(shifter: Shifter): Date

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

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

  121. def to(isoRepr: String): DateRangeBuilder

  122. 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)

  123. 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

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

  125. def until(isoRepr: String): DateRangeBuilder

  126. 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)

  127. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  130. 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
  131. 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
  132. 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
  133. 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