Module: StudTimeFormat::YearOfEra0

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

Instance Method Summary collapse

Instance Method Details

#compileObject



455
456
457
458
459
460
461
# File 'lib/stud/time/format.rb', line 455

def compile
  # No 'era' support, so year is just year.
  return case text_value.length
    when 2 then "t.year % 100"
    else "t.year"
  end
end