method
succ
v1_8_7_72 -
Show latest stable
- Class:
Time
succ()public
Return a new time object, one second later than time.
/*
* call-seq:
* time.succ => new_time
*
* Return a new time object, one second later than <code>time</code>.
*/
static VALUE
time_succ(time)
VALUE time;
{
struct time_object *tobj;
int gmt;
GetTimeval(time, tobj);
gmt = tobj->gmt;
time = rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec);
GetTimeval(time, tobj);
tobj->gmt = gmt;
return time;
} Related methods
- Instance methods
- +
- -
- <=>
- _dump
- asctime
- ctime
- day
- dst?
- eql?
- getgm
- getlocal
- getutc
- gmt?
- gmt_offset
- gmtime
- gmtoff
- hash
- hour
- httpdate
- initialize_copy
- inspect
- isdst
- iso8601
- localtime
- marshal_dump
- marshal_load
- mday
- min
- mon
- month
- rfc2822
- rfc822
- sec
- strftime
- succ
- to_a
- to_f
- to_i
- to_s
- to_yaml
- tv_sec
- tv_usec
- usec
- utc
- utc?
- utc_offset
- w3cdtf
- wday
- xmlschema
- yday
- year
- zone
- Class methods
- _load
- at
- gm
- httpdate
- local
- mktime
- new
- now
- parse
- rfc2822
- times
- utc
- w3cdtf
- xmlschema
- yaml_new
- zone_offset
- Private methods
-
apply_offset -
make_time -
month_days -
zone_utc? -
to_date -
to_datetime