package time
Functionality to assist in TimeSeries related operations
- Alphabetic
- By Inheritance
- time
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait Frequency extends AnyRef
Enumeration of frequency base for utilizing with an RRule
- case class RRule extends Product with Serializable
Wrapper of a RFC 2445 RRULE or EXRULE as implemented in the google rfc2445 java library.
Wrapper of a RFC 2445 RRULE or EXRULE as implemented in the google rfc2445 java library.
For _lots_ of examples of recurrence rule constructions, see the following: http://recurrance.sourceforge.net/
To create, start by invoking RRule(frequency), e.g.
RRule(DAILY)
Use setters to construct the rule you want. For instance:
val rule = RRule(DAILY) byWeekDay(TU, TH) withCount(3)
Finally, attach a start date as follows, to get a DateTime iterator:
val iter = rule from datetime(2007,1,1)
By default, the times created will be in LOCAL time; however, you may attach a different time zone (eg, UTC).
Also, you may join rules or add exceptions via the join and except functions. Eg,
val rules = RRule(DAILY) byWeekDay(TU, TH) join { RRule(DAILY) byWeekDay(MO) } val dates = rules from datetime(2006,12,31) take(5) toList
Please note:
Some of the javadoc descriptions of RFC2445 fields are courtesy of python dateutil 2.1: -- http://labix.org/python-dateutil -- https://pypi.python.org/pypi/python-dateutil
- case class RichDT(dt: DateTime) extends Product with Serializable
Enriched DateTime, helps to simplify Date handling API
- class TimeAccessors[T] extends AnyRef
Class providing time accessor methods for Vec and Index containing DateTimes
Class providing time accessor methods for Vec and Index containing DateTimes
- Attributes
- protected[saddle]
- sealed trait Weekday extends AnyRef
Enumeration of weekdays for utilizing with an RRule
- case class WeekdayNum(n: Int, d: Weekday) extends Product with Serializable
Weekday + Offset, for utilizing with an RRule
Value Members
- val ISO_CHRONO: ISOChronology
- val ISO_CHRONO_UTC: ISOChronology
- val TZ_LOCAL: DateTimeZone
- val TZ_UTC: DateTimeZone
- def datetime(y: Int = 0, m: Int = 0, d: Int = 0, h: Int = 0, t: Int = 0, s: Int = 0, ms: Int = 0, zone: DateTimeZone = TZ_LOCAL): DateTime
Convenience factory for constructing a DateTime instance
- def days(i: Int): Days
- implicit def dt2rd(dt: DateTime): RichDT
- implicit val dtOrdering: Ordering[DateTime]
Provides an implicit ordering for DateTime
- implicit def indexTimeAccessors(ix: Index[DateTime]): TimeAccessors[Index[Int]]
Enrichment methods for Index[DateTime]
- def make(rrule: RRule, start: DateTime, end: DateTime): Index[DateTime]
Factory method to create an Index from a recurrence rule between two dates.
Factory method to create an Index from a recurrence rule between two dates.
For instance:
Index.make(RRules.bizEoms, datetime(2005,1,1), datetime(2005,12,31))
- rrule
Recurrence rule to use
- start
The earliest datetime on or after which to being the recurrence
- end
The latest datetime on or before which to end the recurrence
- def months(i: Int): Months
- implicit val ord: ORD[DateTime]
- def parsedate(s: String, euro: Boolean = false): Option[DateTime]
Convenience method for constructing a DateTime instance from a date string
Convenience method for constructing a DateTime instance from a date string
- s
String representing the date
- euro
Whether to use the european format, eg 2/5/2012 => 2nd of May, 2012
- def quarters(i: Int): Months
- implicit def rd2dt(rd: RichDT): DateTime
- implicit val stTime: ScalarTag[DateTime]
- implicit def vecTimeAccessors(vec: Vec[DateTime]): TimeAccessors[Vec[Int]]
Enrichment methods for Vec[DateTime]
- def weeks(i: Int): Weeks
- def years(i: Int): Years
- case object DAILY extends Frequency with Product with Serializable
- case object FR extends Weekday with Product with Serializable
- case object HOURLY extends Frequency with Product with Serializable
- case object MINUTELY extends Frequency with Product with Serializable
- case object MO extends Weekday with Product with Serializable
- case object MONTHLY extends Frequency with Product with Serializable
- object RRule extends Serializable
- object RRules extends Conform
Helpful prepackaged recurrence rules
- case object SA extends Weekday with Product with Serializable
- case object SECONDLY extends Frequency with Product with Serializable
- case object SU extends Weekday with Product with Serializable
- case object TH extends Weekday with Product with Serializable
- case object TU extends Weekday with Product with Serializable
- case object WE extends Weekday with Product with Serializable
- case object WEEKLY extends Frequency with Product with Serializable
- object Weekday
- case object YEARLY extends Frequency with Product with Serializable
- object timeSorter extends Sorter[DateTime]