module Jekyll::Locale::Filters
Public Instance Methods
localize_date(input, format = :default)
click to toggle source
# File lib/jekyll/locale/filters.rb, line 6 def localize_date(input, format = :default) format = symbol_or_strftime(format) DateTimeHandler.localize(time(input), format) end
Private Instance Methods
symbol_or_strftime(format)
click to toggle source
# File lib/jekyll/locale/filters.rb, line 13 def symbol_or_strftime(format) return format if format.is_a?(Symbol) format = format.to_s if format.start_with?(":") format.sub(":", "").to_sym elsif format.start_with?("%") format else :default end end