struct
TandaCLI::Models::RegularHoursDocument
- TandaCLI::Models::RegularHoursDocument
- Struct
- Value
- Object
Defined in:
tanda_cli/models/regular_hours_document.crtanda_cli/models/regular_hours_document/problem.cr
tanda_cli/models/regular_hours_document/statement.cr
Constant Summary
-
BARE_DAY_PROBLEM =
"needs hours, \"break ...\", \"off\" or \"same as <day>\" after the day" -
HEADER =
"# One line per day, days first. Save and quit to apply, quit without saving to cancel.\n#\n# monday 8:30-17:00 break 30m hours with an automatic break\n# wednesday 8:30-17:00 break 10-10:15 hours with fixed break(s)\n# friday break none keep hours, drop the break\n# saturday off no shift\n# sunday same as saturday copy a day\n#\n# Days: mon, mon-fri, mon,wed,fri, weekdays, weekend, all\n# Breaks: 30m (automatic), 12-12:30 (fixed), none"
Constructors
Class Method Summary
- .parse(text : String) : RegularHoursDocument | Error::InvalidRegularHoursDocument
- .render(week : RegularHoursWeek, start_of_week : Time::DayOfWeek, title : String) : String
Instance Method Summary
- #apply_to(week : RegularHoursWeek) : RegularHoursWeek | Error::InvalidRegularHoursDocument
- #empty? : Bool
- #statements : Array(Statement)
Constructor Detail
Class Method Detail
def self.render(week : RegularHoursWeek, start_of_week : Time::DayOfWeek, title : String) : String
#