lib/active_object/time.rb in active_object-2.2.0 vs lib/active_object/time.rb in active_object-2.2.1

- old
+ new

@@ -5,22 +5,22 @@ formatters = string.scan /[a-z0-9_]+/i format_units = { "d" => "d", "day" => "d", - "day_zero" => "d", + "day_padded" => "d", "dd" => "-d", "Day" => "-d", "day_unpadded" => "-d", "ddd" => "_d", "DAY" => "_d", "day_blank" => "_d", "dddd" => "j", "day_of_the_year" => "j", "m" => "m", "month" => "m", - "month_zero" => "m", + "month_padded" => "m", "mm" => "-m", "Month" => "-m", "month_unpadded" => "-m", "mmm" => "_m", "MONTH" => "_m", @@ -45,17 +45,17 @@ "yr" => "y", "yyyy" => "Y", "year" => "Y", "h" => "H", "hour" => "H", - "hour_zero" => "H", + "hour_padded" => "H", "hh" => "k", "HOUR" => "k", "hour_blank" => "k", "hhh" => "I", "hour_imperical" => "I", - "hour_imperical_zero" => "I", + "hour_imperical_padded" => "I", "hhhh" => "l", "HOUR_IMPERICAL" => "l", "hour_imperical_blank" => "l", "ampm" => "P", "meridian" => "P", @@ -79,28 +79,29 @@ end def to_format(key) format_units = { month: "%m", - month_zero: "%m", + month_padded: "%m", month_unpadded: "%-m", month_blank: "%_m", month_name: "%B", month_name_abbr: "%b", weekday: "%d", - weekday_zero: "%d", + weekday_padded: "%d", weekday_unpadded: "%-d", weekday_blank: "%_d", weekday_name: "%A", weekday_name_abbr: "%a", yr: "%y", + year_abbr: "%y", year: "%Y", hour: "%H", - hour_zero: "%H", + hour_padded: "%H", hour_blank: "%k", hour_imperical: "%I", - hour_imperical_zero: "%I", + hour_imperical_padded: "%I", hour_imperical_blank: "%l", ampm: "%P", meridian: "%P", minute: "%M", second: "%S", @@ -131,15 +132,15 @@ daytime_iso: "%m-%d %H:%M", daytime_imperical: "%B %-d %I:%M %P", daytime_imperical_abbr: "%b %-d %I:%M %P", daytime_imperical_iso: "%m-%d %I:%M %P", time: "%H:%M", - time_zero: "%H:%M", + time_padded: "%H:%M", time_blank: "%k:%M", time_tz: "%H:%M %z", time_tzn: "%H:%M %Z", time_imperical: "%I:%M %P", - time_imperical_zero: "%I:%M %P", + time_imperical_padded: "%I:%M %P", time_imperical_blank: "%l:%M %P", time_imperical_tz: "%I:%M %P %z", time_imperical_tzn: "%I:%M %P %Z" } \ No newline at end of file