Commit a3cd9f99a3b5cdabdccb43316f22f65a8dbba1fc
1 parent
1dc6d5c3
Exists in
master
and in
1 other branch
Fixed indentation
Showing
1 changed file
with
25 additions
and
25 deletions
Show diff stats
lib/groupdate/magic.rb
@@ -91,31 +91,31 @@ module Groupdate | @@ -91,31 +91,31 @@ module Groupdate | ||
91 | else | 91 | else |
92 | format = | 92 | format = |
93 | case field | 93 | case field |
94 | - when :hour_of_day | ||
95 | - "%H" | ||
96 | - when :minute_of_hour | ||
97 | - "%M" | ||
98 | - when :day_of_week | ||
99 | - "%w" | ||
100 | - when :day_of_month | ||
101 | - "%d" | ||
102 | - when :month_of_year | ||
103 | - "%m" | ||
104 | - when :second | ||
105 | - "%Y-%m-%d %H:%M:%S UTC" | ||
106 | - when :minute | ||
107 | - "%Y-%m-%d %H:%M:00 UTC" | ||
108 | - when :hour | ||
109 | - "%Y-%m-%d %H:00:00 UTC" | ||
110 | - when :day | ||
111 | - "%Y-%m-%d 00:00:00 UTC" | ||
112 | - when :month | ||
113 | - "%Y-%m-01 00:00:00 UTC" | ||
114 | - when :quarter | ||
115 | - raise Groupdate::Error, "Quarter not supported for SQLite" | ||
116 | - else # year | ||
117 | - "%Y-01-01 00:00:00 UTC" | ||
118 | - end | 94 | + when :hour_of_day |
95 | + "%H" | ||
96 | + when :minute_of_hour | ||
97 | + "%M" | ||
98 | + when :day_of_week | ||
99 | + "%w" | ||
100 | + when :day_of_month | ||
101 | + "%d" | ||
102 | + when :month_of_year | ||
103 | + "%m" | ||
104 | + when :second | ||
105 | + "%Y-%m-%d %H:%M:%S UTC" | ||
106 | + when :minute | ||
107 | + "%Y-%m-%d %H:%M:00 UTC" | ||
108 | + when :hour | ||
109 | + "%Y-%m-%d %H:00:00 UTC" | ||
110 | + when :day | ||
111 | + "%Y-%m-%d 00:00:00 UTC" | ||
112 | + when :month | ||
113 | + "%Y-%m-01 00:00:00 UTC" | ||
114 | + when :quarter | ||
115 | + raise Groupdate::Error, "Quarter not supported for SQLite" | ||
116 | + else # year | ||
117 | + "%Y-01-01 00:00:00 UTC" | ||
118 | + end | ||
119 | 119 | ||
120 | ["strftime('#{format.gsub(/%/, '%%')}', #{column})"] | 120 | ["strftime('#{format.gsub(/%/, '%%')}', #{column})"] |
121 | end | 121 | end |