Class: GBWorkDay::Date
Instance Attribute Summary collapse
-
#work_week ⇒ Object
Returns the value of attribute work_week.
Class Method Summary collapse
-
.from_date(date, work_week = nil) ⇒ Object
Create GBWorkingDay::Date object from a given Date object.
Instance Method Summary collapse
Methods inherited from Date
#free?, #minus_with_work_duration, #next_work_day, #plus_with_work_duration, #previous_work_day, #work?, #work_date
Instance Attribute Details
#work_week ⇒ Object
Returns the value of attribute work_week.
4 5 6 |
# File 'lib/gb_work_day/helpers/date.rb', line 4 def work_week @work_week end |
Class Method Details
.from_date(date, work_week = nil) ⇒ Object
Create GBWorkingDay::Date object from a given Date object. Copy constructor.
26 27 28 29 30 |
# File 'lib/gb_work_day/helpers/date.rb', line 26 def from_date(date, work_week = nil) new_date = self.jd(date.jd) new_date.work_week = work_week if work_week new_date end |