Class/Object

io.lamma

Date

Related Docs: object Date | package lamma

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

Value Members

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

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

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

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

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

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

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

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

    Permalink

    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

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

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

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    YearOps
  27. lazy val daysOfMonth: DateRangeBuilder

    Permalink

    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]

    Permalink

    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

    Permalink

    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)

    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]

    Permalink

    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

    Permalink

    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]

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef
  35. def finalize(): Unit

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

    Permalink

    first day of current month

    first day of current month

    Definition Classes
    MonthOps
  37. lazy val firstDayOfNextMonth: Date

    Permalink

    shorthand of

    shorthand of

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

    Permalink

    first day of next year

    first day of next year

    Definition Classes
    YearOps
  39. lazy val firstDayOfPreviousMonth: Date

    Permalink

    shorthand of

    shorthand of

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

    Permalink

    first day of previous year.

    first day of previous year. This is different from previousFirstDayOfYear

    Definition Classes
    YearOps
  41. lazy val firstDayOfYear: Date

    Permalink

    first day of the year

    first day of the year

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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[_]

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

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

    Permalink

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

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

  50. def isBefore(that: Date): Boolean

    Permalink

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

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

  51. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  52. lazy val isLastDayOfMonth: Boolean

    Permalink
    Definition Classes
    MonthOps
  53. lazy val isLastDayOfYear: Boolean

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

    Permalink

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

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

  55. def isOnOrBefore(that: Date): Boolean

    Permalink

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

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

  56. def isWeekend: Boolean

    Permalink
    Definition Classes
    WeekOps
  57. lazy val lastDayOfMonth: Date

    Permalink

    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

    Permalink

    shorthand of

    shorthand of

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

    Permalink

    last day of next year.

    last day of next year. This is different from nextLastDayOfYear

    Definition Classes
    YearOps
  60. lazy val lastDayOfPreviousMonth: Date

    Permalink

    shorthand of

    shorthand of

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

    Permalink

    last day of previous year

    last day of previous year

    Definition Classes
    YearOps
  62. lazy val lastDayOfYear: Date

    Permalink

    last day of the year

    last day of the year

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink
  75. def modifiedFollowing(cal: HolidayRule): Date

    Permalink

    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

    Permalink

    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

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

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

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

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

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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 quarter: Quarter

    Permalink
    Definition Classes
    MonthOps
  114. lazy val sameWeekdaysOfMonth: List[Date]

    Permalink

    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

    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 sameWeekdaysOfMonth4j: List[Date]

    Permalink

    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
  116. lazy val sameWeekdaysOfYear: List[Date]

    Permalink

    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

    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. lazy val sameWeekdaysOfYear4j: List[Date]

    Permalink

    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
  118. def select(selector: Selector): Date

    Permalink
  119. def shift(shifter: Shifter): Date

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

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

    Permalink
  122. def to(isoRepr: String): DateRangeBuilder

    Permalink
  123. def to(that: Date): DateRangeBuilder

    Permalink

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

    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)

  124. lazy val toISOInt: Int

    Permalink

    int representation in yyyyMMdd form

  125. lazy val toISOString: String

    Permalink

    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

    Permalink
  127. def until(isoRepr: String): DateRangeBuilder

    Permalink
  128. def until(that: Date): DateRangeBuilder

    Permalink

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

    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

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

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

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