struct
TandaCLI::Models::RegularHoursSchedule
- TandaCLI::Models::RegularHoursSchedule
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
- TandaCLI::Utils::Mixins::PrettyTimes
- TandaCLI::Utils::Mixins::PrettyTimes::PrettyMaybeFinish
- TandaCLI::Utils::Mixins::PrettyTimes::PrettyMaybeStart
Defined in:
tanda_cli/models/regular_hours_schedule.crtanda_cli/models/regular_hours_schedule/break.cr
Constant Summary
-
OVERNIGHT_WARNING_LENGTH =
16.hours
Constructors
- .new(day_of_week : Time::DayOfWeek, start_time : Time, finish_time : Time, breaks : Array(Break) = Array(Break).new, automatic_break_length : Time::Span = Time::Span.zero)
- .new(pull : JSON::PullParser)
Class Method Summary
Instance Method Summary
- #automatic_break_length : Time::Span
- #break_length : Time::Span
- #break_plan : BreakPlan::Any
- #breaks : Array(Break)
- #day_of_week : Time::DayOfWeek
- #finish_time : Time
- #hours : TimeRange
- #length : Time::Span
- #pretty_worked : String
- #same_as?(other : RegularHoursSchedule) : Bool
- #start_time : Time
- #with_break_plan(break_plan : BreakPlan::Any) : self | Error::Base
- #with_hours(hours : TimeRange) : self | Error::Base
- #worked_length : Time::Span
Instance methods inherited from module TandaCLI::Utils::Mixins::PrettyTimes::PrettyMaybeFinish
pretty_finish_time : String | Nil
pretty_finish_time
Instance methods inherited from module TandaCLI::Utils::Mixins::PrettyTimes::PrettyMaybeStart
pretty_start_time : String | Nil
pretty_start_time
Constructor Detail
def self.new(day_of_week : Time::DayOfWeek, start_time : Time, finish_time : Time, breaks : Array(Break) = Array(Break).new, automatic_break_length : Time::Span = Time::Span.zero)
#
Class Method Detail
def self.build(day_of_week : Time::DayOfWeek, hours : TimeRange, break_plan : BreakPlan::Any) : self | Error::Base
#