Skip to content

Commit

Permalink
Merge commit 'jakemcc/master' into working
Browse files Browse the repository at this point in the history
  • Loading branch information
liebke committed Feb 22, 2010
2 parents 38ccb34 + 114bb85 commit 277d8ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions modules/incanter-charts/src/main/clojure/incanter/charts.clj
Original file line number Diff line number Diff line change
Expand Up @@ -783,11 +783,11 @@
Examples:
(use '(incanter core stats charts chrono))
(use '(incanter core charts chrono))
;; plot numbers against years starting with 1900
(def dates (map #(-> (joda-date (+ 1900 %) 1 1 12 0 0 0 (time-zone 0))
.getMillis)
(def dates (map #(-> (joda-date (+ 1900 %) 1 1)
to-ms)
(range 100)))
(def y (range 100))
(view (time-series-plot dates y
Expand Down
10 changes: 6 additions & 4 deletions modules/incanter-chrono/src/main/clojure/incanter/chrono.clj
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,15 @@ t. If t is not provided, the current system time is assumed."
(cons from (date-seq units (later from (period 1 units)) to))))))

(defn later-seq
"Returns a lazy seq of DateTime objects that is later than time t by
a constant period p. A default of now is used if t is not provided."
"Returns a lazy seq of DateTime objects that is later than start by
a constant period, interval. A default of now is used if start is not
provided."
([interval] (later-seq interval (joda-date)))
([interval start] (iterate #(later % interval) (joda-date start))))

(defn earlier-seq
"Returns a lazy seq of DateTime objects that is earlier than time t by
a constant period p. A default of now is used if t is not provided."
"Returns a lazy seq of DateTime objects that is earlier than start by
a constant period, interval. A default of now is used if start is not
provided."
([interval] (earlier-seq interval (joda-date)))
([interval start] (iterate #(earlier % interval) (joda-date start))))

0 comments on commit 277d8ad

Please sign in to comment.