struct TandaCLI::Models::RegularHoursDocument

Defined in:

tanda_cli/models/regular_hours_document.cr
tanda_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

Instance Method Summary

Constructor Detail

def self.new(statements : Array(Statement)) #

[View source]

Class Method Detail

def self.parse(text : String) : RegularHoursDocument | Error::InvalidRegularHoursDocument #

[View source]
def self.render(week : RegularHoursWeek, start_of_week : Time::DayOfWeek, title : String) : String #

[View source]

Instance Method Detail


[View source]
def empty? : Bool #

[View source]
def statements : Array(Statement) #

[View source]