method

_parse_beat

ruby latest stable - Class: Date

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_6_287) is shown here.

_parse_beat(str, e)
private

No documentation available.

# File lib/date/format.rb, line 738
  def self._parse_beat(str, e) # :nodoc:
    if str.sub!(/@\s*(\d+)(?:[,.](\d*))?/, ' ')
      beat = $1.to_i.to_r
      beat += $2.to_i.to_r / (10**$2.size) if $2
      secs = beat.to_r / 1000
      h, min, s, fr = self.day_fraction_to_time(secs)
      e.hour = h
      e.min = min
      e.sec = s
      e.sec_fraction = fr * 86400
      e.zone = '+01:00'
      true
    end
  end