method
_parse_day
ruby latest stable - Class:
Date
_parse_day(str, e)private
No documentation available.
# 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