timescopes

General time scoping methods

TimeScopes.daily(start=nil)

> TimeScopes.daily
=> [2015-10-31 00:00:00 UTC, 2015-11-01 00:00:00 UTC]

TimeScopes.weekly(start=nil)

> TimeScopes.weekly
=> [2015-10-26 00:00:00 UTC, 2015-11-02 00:00:00 UTC]

TimeScopes.monthly(start=nil)

> TimeScopes.monthly
=> [2015-10-01 00:00:00 UTC, 2015-11-01 00:00:00 UTC]

TimeScopes.overall(start=nil)

> TimeScopes.overall
=> [2000-01-01 00:00:00 -0800, 2015-11-01 00:00:00 UTC]

TimeScopes.start_of_day()

> TimeScopes.start_of_day(Date.today)
=> "2015-10-31 00:00:00Z"

TimeScopes.start_of_month()

> TimeScopes.start_of_month(Date.today)
=> "2015-10-01 00:00:00Z"

Copyright © 2015 Ian Hunter. See LICENSE.txt for further details.