Class: Date

Inherits:
Object show all
Defined in:
lib/opendmm/utils.rb

Class Method Summary collapse

Class Method Details

.parse_with_chinese_support(str) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/opendmm/utils.rb', line 9

def parse_with_chinese_support(str)
  case str
  when /(\d{4})年(\d{1,2})月(\d{1,2})日/
    return new($1.to_i, $2.to_i, $3.to_i)
  else
    return parse_without_chinese_support(str)
  end
end