Flowdock
method

_parse_day

Importance_0
v1_9_2_180 - Show latest stable - 0 notes - Class: Date
_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.