Skip to content

Files

Latest commit

 

History

History
 
 

moment-range

cljsjs/moment-range

[cljsjs/moment-range "4.0.2-0"] ;; latest release

This jar comes with deps.cljs as used by the Foreign Libs feature of the ClojureScript compiler. After adding the above dependency to your project you can require the packaged library like so:

(ns application.core
  (:require cljsjs.moment-range))

;;Create a date range for the current month
(.range (js/moment) "month")

;;Create a range for an ISO 8601 time interval string
(.range js/moment "2015-09-01T00:00:00+10:00/2015-09-30T23:59:59+10:00")


;;Create a range for two arbitrary moments
(.range js/moment (.startOf (js/moment) "month") (.endOf (js/moment) "month"))