lib/parsi-localize.rb in parsi-localize-0.3.1 vs lib/parsi-localize.rb in parsi-localize-0.3.2

- old
+ new

@@ -8,10 +8,10 @@ return '' if object.nil? locale = options.delete(:locale) || config.locale format = options.delete(:format) || :default - if [:default, :short, :long].include? format + if format.is_a? Symbol format = I18n.t("date.formats.#{format}") if object.is_a? Date format = I18n.t("time.formats.#{format}") if object.is_a? Time end if locale == :fa