Flowdock
method

_parse_day

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Date

Method deprecated or moved

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

_parse_day(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 671
  def self._parse_day(str, e) # :nodoc:
    if str.sub!(/\b(#{Format::ABBR_DAYS.keys.join('|')})[^-\d\s]*/o, ' ')
      e.wday = Format::ABBR_DAYS[$1.downcase]
      true
    elsif str.sub!(/\b(?!\dth)(su|mo|tu|we|th|fr|sa)\b/i, ' ')
      e.wday = %w(su mo tu we th fr sa).index($1.downcase)
      true
    end
  end
Register or log in to add new notes.