Sha256: a875a8f387c863bfbc7860f3776f42946cfeed0cb7c76dce4506e77ee0f574ed
Contents?: true
Size: 608 Bytes
Versions: 34
Compression:
Stored size: 608 Bytes
Contents
module Cms # Helper methods for centralizing Date handling for the CMS. # Eventually, we will need a way to handle i18n formatting of dates, but I would also like to have US style dates # for US locales (M/d/yy), but since Ruby 1.8.7 and 1.9.2 have different handling of Date.parse, that would take some # monkeypatching. # class DatePicker class << self # Returns the date format that the JQuery selector will need to use. def jquery_format 'yy/mm/dd' end def format_for_ui(date) date ? date.strftime('%Y/%m/%d') : nil end end end end
Version data entries
34 entries across 34 versions & 2 rubygems