Helper functions for performing semester calculations on BYU's semester/term schedule
Helper functions for performing semester calculations on BYU's semester/term schedule
(add-yt ytstring x)
Add ytstring
with x
, coming up with a valid semester.
e.g. (+ "20191" 5) is "20203", and (+ "20191" -1) is ("20185")
Add `ytstring` with `x`, coming up with a valid semester. e.g. (+ "20191" 5) is "20203", and (+ "20191" -1) is ("20185")
(dec-yt yt)
Taking a yt string, increment it appropriately and return a map. Skip 2, wrap at 5.
Taking a yt string, increment it appropriately and return a map. Skip 2, wrap at 5.
(gen-yt-text yt)
Take a yt string (20155) and return text ("Fall, 2015")
Take a yt string (20155) and return text ("Fall, 2015")
(get-term yt)
Get the term digit from a 5-digit yt
Get the term digit from a 5-digit yt
(get-year yt)
Get the 4-digit year from a 5-digit yt
Get the 4-digit year from a 5-digit yt
(inc-yt yt)
Taking a yt string, increment it appropriately and return a map. Skip 2, wrap at 5.
Taking a yt string, increment it appropriately and return a map. Skip 2, wrap at 5.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close