APIdock / Ruby
/
method

yday

ruby latest stable - Class: Time
yday()
public

Returns an integer representing the day of the year, 1..366.

t = Time .now  #=> 2007年11月19日 08:32:31 -0600
t.yday  #=> 323
static VALUE
time_yday(VALUE time)
{
 struct time_object *tobj;
 GetTimeval(time, tobj);
 MAKE_TM(time, tobj);
 return INT2FIX(tobj->vtm.yday);
}

AltStyle によって変換されたページ (->オリジナル) /