Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shows the current date. It's that simple.
(ns com.luisthiamnye.roam-render.simple-current-date-widget)
(defn date-widget [_]
[:span {:style {:color "#31495E"
:font-size "17px"}}
"Today: "
[:b
(let [d (js/Date.)]
(str (.toLocaleDateString d "en-GB"
#js {:weekday "short"
:day "numeric"
:month "short"
:year "numeric"})))]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment