Class: ChronicDuration

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

Class Method Summary collapse

Class Method Details

.parse_with_chinese_support(str) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/opendmm/utils.rb', line 21

def parse_with_chinese_support(str)
  case str
  when /(\d+)(\s*)分/
    return $1.to_i.minutes
  else
    return parse_without_chinese_support(str)
  end
end