method
hash
v1_8_7_72 -
Show latest stable
- Class:
Time
hash()public
Return a hash code for this time object.
/*
* call-seq:
* time.hash => fixnum
*
* Return a hash code for this time object.
*/
static VALUE
time_hash(time)
VALUE time;
{
struct time_object *tobj;
long hash;
GetTimeval(time, tobj);
hash = tobj->tv.tv_sec ^ tobj->tv.tv_usec;
return LONG2FIX(hash);
} 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