-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Using some of these in other projects. Would be nice to have them added. Not to keen on the naming just yet, so throwing some examples below:
time = Time.now
# => 2013-06-20 14:12:30 -0400
# => time.usec => 124634
time_truncate(time, :day)
# => 2013-06-20 14:12:30 -0400
time_truncate(time, :hour)
# => 2013-06-20 14:00:00 -0400
time_strip(time, :minute)
# => 2013-06-20 14:12:00 -0400
time_trim(time, :second)
# => 2013-06-20 14:12:00 -0400
# => time.usec => 0See rspec/rspec-mocks#318 for a similar discussion.