method

_parse_beat

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - 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

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# 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
Register or log in to add new notes.