Method: Date#to_time
- Defined in:
- date_core.c
#to_time ⇒ Time
8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 |
# File 'date_core.c', line 8949
static VALUE
date_to_time(VALUE self)
{
VALUE t;
get_d1a(self);
if (m_julian_p(adat)) {
VALUE g = d_lite_gregorian(self);
get_d1b(g);
adat = bdat;
self = g;
}
t = f_local3(rb_cTime,
m_real_year(adat),
INT2FIX(m_mon(adat)),
INT2FIX(m_mday(adat)));
RB_GC_GUARD(self); /* may be the converted gregorian */
return t;
}
|