DateTime._strptime(string[, format='%FT%T%z']) â hash Class Public methods Parses the given representation of date and time with the given template, and returns a hash of parsed elements. _strptime does not support specification of flags and width unlike strftime. See also strptime(3) and strftime.
d.year â integer Instance Public methods Returns the year. Date.new(2001,2,3).year #=> 2001 (Date.new(1,1,1) - 1).year #=> 0
d.yday â fixnum Instance Public methods Returns the day of the year (1-366). Date.new(2001,2,3).yday #=> 34
d.iso8601 â stringd.xmlschema â string Instance Public methods This method is equivalent to strftime('%F').
d.wednesday? â bool Instance Public methods Returns true if the date is Wednesday.
d.wday â fixnum Instance Public methods Returns the day of week (0-6, Sunday is zero). Date.new(2001,2,3).wday #=> 6
d.upto(max) â enumeratord.upto(max){|date| ...} â self Instance Public methods This method is equivalent to step(max, 1){|date| â¦}.
d.tuesday? â bool Instance Public methods Returns true if the date is Tuesday.
d.to_time â time Instance Public methods Returns a Time object which denotes self.
d.to_s â string Instance Public methods Returns a string in an ISO 8601 format (This method doesn't use the expanded representations). Date.new(2001,2,3).to_s #=> "2001-02-03"
Page 2176 of 2275