0.0
No commit activity in last 3 years
No release in over 3 years
time_pieces is a library to make it easy to add/subtract time from a schedule
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.10.2
~> 2.3.2
~> 10.5

Runtime

 Project Readme

TimePieces

This gem is for managing time pieces. It lets you add and subtract durations to help you with scheduling. For example if you have a duration (9:00am - 5:00pm) and you subtract the duration (1:00pm - 2:00pm) it will result in a time set with 2 time duration of (9:00am - 1:00pm) and (2:00pm - 5:00pm). You can also add durations. To make an object into a duration just use. You also have to include the method duration_copy which is used when creating new objects, for example when a duration is split.

include TimePieces::Duration

def duration_copy
    return self.clone
end

Installation

Add this line to your application's Gemfile:

gem 'time_pieces'

And then execute:

$ bundle

Or install it yourself as:

$ gem install time_pieces

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/riggleg/time_pieces

License

The gem is available as open source under the terms of the MIT License.