lib/hsql/data.rb in hsql-0.4.0 vs lib/hsql/data.rb in hsql-0.4.1

- old
+ new

@@ -35,11 +35,11 @@ # Time ranges surrounding the moment provided. moment = time moments = [] moments += [ - ['now', moment, 'The moment provided via --date or --timestamp (defaults to the current system time)'], + ['now', moment, 'The moment provided via --date or --timestamp (defaults to the current system time)'] ] moments += [ ['beginning_of_hour', moment.beginning_of_hour, 'The first second of the hour'], ['beginning_of_day', moment.beginning_of_day, 'The first second of the day'], @@ -50,44 +50,44 @@ ['end_of_hour', moment.end_of_hour, 'The last second of the hour'], ['end_of_day', moment.end_of_day, 'The last second of the day'], ['end_of_week', moment.end_of_week, 'The last second of the week'], ['end_of_month', moment.end_of_month, 'The last second of the month'], ['end_of_quarter', moment.end_of_quarter, 'The last second of the quarter'], - ['end_of_year', moment.end_of_year, 'The last second of the year'], + ['end_of_year', moment.end_of_year, 'The last second of the year'] ] # Time ranges immediately preceding the one in which `time` appears. moment = time - 1.hour moments += [ ['beginning_of_previous_hour', moment.beginning_of_hour, 'The first second of the previous hour'], - ['end_of_previous_hour', moment.end_of_hour, 'The last second of the previous hour'], + ['end_of_previous_hour', moment.end_of_hour, 'The last second of the previous hour'] ] moment = time - 1.day moments += [ ['beginning_of_previous_day', moment.beginning_of_day, 'The first second of the previous day'], - ['end_of_previous_day', moment.end_of_day, 'The last second of the previous day'], + ['end_of_previous_day', moment.end_of_day, 'The last second of the previous day'] ] moment = time - 1.week moments += [ ['beginning_of_previous_week', moment.beginning_of_week, 'The first second of the previous week'], - ['end_of_previous_week', moment.end_of_week, 'The last second of the previous week'], + ['end_of_previous_week', moment.end_of_week, 'The last second of the previous week'] ] moment = time - 1.month moments += [ ['beginning_of_previous_month', moment.beginning_of_month, 'The first second of the previous month'], - ['end_of_previous_month', moment.end_of_month, 'The last second of the previous month'], + ['end_of_previous_month', moment.end_of_month, 'The last second of the previous month'] ] moment = time - 3.months moments += [ ['beginning_of_previous_quarter', moment.beginning_of_quarter, 'The first second of the previous quarter'], - ['end_of_previous_quarter', moment.end_of_quarter, 'The last second of the previous quarter'], + ['end_of_previous_quarter', moment.end_of_quarter, 'The last second of the previous quarter'] ] moment = time - 1.year moments += [ ['beginning_of_previous_year', moment.beginning_of_year, 'The first second of the previous year'], - ['end_of_previous_year', moment.end_of_year, 'The last second of the previous year'], + ['end_of_previous_year', moment.end_of_year, 'The last second of the previous year'] ] moments end end