class PayrolleeCz::PayrollPeriod
Constants
- NOW
Attributes
code[R]
name[R]
Public Class Methods
new(year, month, name)
click to toggle source
# File lib/payrollee_cz/core/payroll_period.rb, line 6 def initialize(year, month, name) @code = (year * 100) + month @name = name end
Public Instance Methods
description()
click to toggle source
# File lib/payrollee_cz/core/payroll_period.rb, line 19 def description calendar_day = Date.new(year, month, 1) calendar_day.to_formatted_s(:month_name_and_year) end
month()
click to toggle source
# File lib/payrollee_cz/core/payroll_period.rb, line 15 def month code%100 end
year()
click to toggle source
# File lib/payrollee_cz/core/payroll_period.rb, line 11 def year code/100 end