Module: Jekyll::TermFormatShort
- Defined in:
- jekyll/_plugins/term-format-short.rb
Instance Method Summary collapse
Instance Method Details
#termformatshort(input) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'jekyll/_plugins/term-format-short.rb', line 36 def termformatshort(input) if (input.nil?) return nil end values = input.split("/") year = Integer(values[0]) % 100 month = Integer(values[1]) if month == 1 term_string = "Sp" elsif month == 6 term_string = "su" elsif month == 9 term_string = "Fa" end "#{"%s%d" % [term_string, year]}" end |