Liking cljdoc? Tell your friends :D

hara.io.scheduler.tab


*-clj

(*-)
(*- s)
(*- a b)
(*- a b s)

takes a string and returns something (-) => :

(map (*- 2) (range 60)) => (map even? (range 60))

takes a string and returns something
(*-) => :*

(map (*- 2) (range 60))
=> (map even? (range 60))

raw docstring

+schedule-elements+clj


match-array?clj

(match-array? dt-array tab-array)

takes an array representation for match comparison

(match-array? [30 14 0 4 26 7 2012] [(- 0 60 5) (-) (-) (-) (-) (-) (*-)]) => true

(match-array? [31 14 0 4 26 7 2012] [(- 0 60 5) (-) (-) (-) (-) (-) (*-)]) => false

takes an array representation for match comparison

(match-array? [30 14 0 4 26 7 2012]
              [(*- 0 60 5) (*-) (*-) (*-) (*-) (*-) (*-)])
=> true

(match-array? [31 14 0 4 26 7 2012]
              [(*- 0 60 5) (*-) (*-) (*-) (*-) (*-) (*-)])
=> false
raw docstring

match-element?clj

(match-element? dt-e tab-e)

takes an element of the array and compares with a single matcher

(match-element? 1 :*) => true

(match-element? 1 [2 3 4]) => false

takes an element of the array and compares with a single matcher

(match-element? 1 :*)
=> true

(match-element? 1 [2 3 4])
=> false

raw docstring

nil-arrayclj


parse-tabclj

(parse-tab s)

takes a string and creates matches

(parse-tab "* * * * * * *") => '[(:) (:) (:) (:) (:) (:) (:*)]

(parse-tab "* * * * * *") => '[(0) (:) (:) (:) (:) (:) (:)]

(parse-tab "* * * * *") => (throws Exception)

takes a string and creates matches

(parse-tab "* * * * * * *")
=> '[(:*) (:*) (:*) (:*) (:*) (:*) (:*)]

(parse-tab "* * * * * *")
=> '[(0) (:*) (:*) (:*) (:*) (:*) (:*)]

(parse-tab "* * * * *")
=> (throws Exception)

raw docstring

parse-tab-elementclj

(parse-tab-element es)

make a tab element into a array element

(parse-tab-element "1") => 1

(parse-tab-element "") => :

(parse-tab-element "1-5") => fn?

make a tab element into a array element

(parse-tab-element "1") => 1

(parse-tab-element "*") => :*

(parse-tab-element "1-5") => fn?
raw docstring

parse-tab-groupclj

(parse-tab-group s)

makes a tab group from a string seperated by commas

(parse-tab-group "1,3,15") => '(1 3 15)

makes a tab group from a string seperated by commas

(parse-tab-group "1,3,15")
=> '(1 3 15)
raw docstring

to-time-arrayclj

(to-time-array t)
(to-time-array t tz)

takes a time element and returns an array representation

(to-time-array #inst "1970-01-01T00:00:00.000-00:00" "UTC") => [0 0 0 4 1 1 1970]

(to-time-array #inst "1970-01-01T00:00:00.000-00:00" "GMT-10") => [0 0 14 3 31 12 1969]

takes a time element and returns an array representation

(to-time-array #inst "1970-01-01T00:00:00.000-00:00" "UTC")
=> [0 0 0 4 1 1 1970]

(to-time-array #inst "1970-01-01T00:00:00.000-00:00" "GMT-10")
=> [0 0 14 3 31 12 1969]
raw docstring

valid-tab?clj

(valid-tab? s)

checks if the tab is valid

(valid-tab? "*") => nil

(valid-tab? "* * * * * * *") => true

checks if the tab is valid

(valid-tab? "*") => nil

(valid-tab? "* * * * * * *") => true
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close