Date Formats in Clojurescript
Formatting dates in JavaScript can be tricky, even getting the name of the month. It's possible to use the clunky $.datepicker.formatDate (); from jquery.ui, but in Clojurescript we have the Google Clojure library at our disposal. Its goog.i18n.DateTimeFormat class has a few useful functions that can be applied like so:
Example usage:
Ah, there's the name of the month!
Posted: 14 July 2012
comments powered by Disqus