D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Date
/
Filename :
step-i.ri
back
Copy
U:RDoc::AnyMethod[iI" step:ETI"Date#step;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"+Calls the block with specified dates; ;TI"returns +self+.;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I" The first +date+ is +self+.;To;;0; [o; ; [I"5Each successive +date+ is <tt>date + step</tt>, ;TI"3where +step+ is the numeric step size in days.;To;;0; [o; ; [I"GThe last date is the last one that is before or equal to +limit+, ;TI"$which should be a \Date object.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"$limit = Date.new(2001, 12, 31) ;TI"HDate.new(2001).step(limit){|date| p date.to_s if date.mday == 31 } ;T:@format0o; ; [I"Output:;T@o;; [I""2001-01-31" ;TI""2001-03-31" ;TI""2001-05-31" ;TI""2001-07-31" ;TI""2001-08-31" ;TI""2001-10-31" ;TI""2001-12-31" ;T;0o; ; [I"0Returns an Enumerator if no block is given.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"0step(limit, step = 1){|date| ... } -> self ;T0[ I"(p1, p2 = v2);T@9FI" Date;TcRDoc::NormalClass00