Module: Timely
- Defined in:
- lib/timely/trackable_date_set.rb,
lib/timely.rb,
lib/timely/date.rb,
lib/timely/time.rb,
lib/timely/range.rb,
lib/timely/string.rb,
lib/timely/version.rb,
lib/timely/date_time.rb,
lib/timely/week_days.rb,
lib/timely/date_range.rb,
lib/timely/rails/time.rb,
lib/timely/time_since.rb,
lib/timely/date_chooser.rb,
lib/timely/rails/period.rb,
lib/timely/rails/season.rb,
lib/timely/rails/date_group.rb,
lib/timely/rails/extensions.rb,
lib/timely/rails/calendar_tag.rb,
lib/timely/temporal_patterns/finder.rb,
lib/timely/temporal_patterns/pattern.rb,
lib/timely/temporal_patterns/interval.rb,
lib/timely/temporal_patterns/frequency.rb,
lib/timely/rails/date_range_validity_module.rb
Overview
Track a set of dates (usually a range)
Tracking means to remember whether each date has been worked on, or ‘done’.
range = Date.current..(Date.current+10)
my_dates = TrackableDateSet.new(range)
my_dates.set_date_done!(Date.current)
my_dates.set_dates_done!([Date.current+1, Date.current+2])
my_dates.set_all_done!
As well as tracking status of individual dates, you can also remember whether any action has been applied or not across the whole set:
my_dates = TrackableDateSet.new(Date.current..(Date.current+10))
my_dates.apply_action(:minimum_nights_surcharge)
my_dates.action_applied?(:minimum_nights_surcharge) # will be true
Defined Under Namespace
Modules: ActionViewHelpers, Date, DateRangeValidityModule, DateTime, Extensions, Rails, Range, String, TemporalPatterns, Time, TimeSince Classes: DateChooser, DateChooserException, DateFormatException, DateGroup, DateRange, Period, Season, TrackableDateSet, WeekDays
Constant Summary collapse
- VERSION =
'0.8.0'
Class Method Summary collapse
-
.current_date ⇒ Object
Uses Date.current to be more accurate for Rails applications.
- .load ⇒ Object