Module: StudTimeFormat::MonthOfYear0

Defined in:
lib/stud/time/format.rb

Instance Method Summary collapse

Instance Method Details

#compileObject



782
783
784
785
786
787
788
# File 'lib/stud/time/format.rb', line 782

def compile
  return case text_value.length
    when 1..2 then %Q<sprintf("%0#{text_value.length}d", t.month)>
    when 3 then %Q<t.strftime("%b")>
    else %Q<t.strftime("%B")>
  end
end