lib/tabs/resolutions/month.rb in tabs-0.9.0 vs lib/tabs/resolutions/month.rb in tabs-0.9.1
- old
+ new
@@ -14,10 +14,14 @@
dt = DateTime.strptime(str, PATTERN)
self.normalize(dt)
end
def from_seconds(s)
- s / 1728000
+ s / 1.month
+ end
+
+ def add(ts, num)
+ ts + num.months
end
def normalize(ts)
Time.utc(ts.year, ts.month)
end