#include "ruby.h"#include "ruby/encoding.h"#include <math.h>#include <time.h>#include <assert.h>#include "date_tmx.h"#include <errno.h>Go to the source code of this file.
Data Structures | |
| struct | SimpleDateData |
| struct | ComplexDateData |
| union | DateData |
Defines | |
| #define | NDEBUG |
| #define | USE_PACK |
| #define | f_boolcast(x) ((x) ? Qtrue : Qfalse) |
| #define | f_abs(x) rb_funcall(x, rb_intern("abs"), 0) |
| #define | f_negate(x) rb_funcall(x, rb_intern("-@"), 0) |
| #define | f_add(x, y) rb_funcall(x, '+', 1, y) |
| #define | f_sub(x, y) rb_funcall(x, '-', 1, y) |
| #define | f_mul(x, y) rb_funcall(x, '*', 1, y) |
| #define | f_div(x, y) rb_funcall(x, '/', 1, y) |
| #define | f_quo(x, y) rb_funcall(x, rb_intern("quo"), 1, y) |
| #define | f_idiv(x, y) rb_funcall(x, rb_intern("div"), 1, y) |
| #define | f_mod(x, y) rb_funcall(x, '%', 1, y) |
| #define | f_remainder(x, y) rb_funcall(x, rb_intern("remainder"), 1, y) |
| #define | f_expt(x, y) rb_funcall(x, rb_intern("**"), 1, y) |
| #define | f_floor(x) rb_funcall(x, rb_intern("floor"), 0) |
| #define | f_ceil(x) rb_funcall(x, rb_intern("ceil"), 0) |
| #define | f_truncate(x) rb_funcall(x, rb_intern("truncate"), 0) |
| #define | f_round(x) rb_funcall(x, rb_intern("round"), 0) |
| #define | f_to_i(x) rb_funcall(x, rb_intern("to_i"), 0) |
| #define | f_to_r(x) rb_funcall(x, rb_intern("to_r"), 0) |
| #define | f_to_s(x) rb_funcall(x, rb_intern("to_s"), 0) |
| #define | f_inspect(x) rb_funcall(x, rb_intern("inspect"), 0) |
| #define | f_add3(x, y, z) f_add(f_add(x, y), z) |
| #define | f_sub3(x, y, z) f_sub(f_sub(x, y), z) |
| #define | f_nonzero_p(x) (!f_zero_p(x)) |
| #define | f_positive_p(x) (!f_negative_p(x)) |
| #define | f_ajd(x) rb_funcall(x, rb_intern("ajd"), 0) |
| #define | f_jd(x) rb_funcall(x, rb_intern("jd"), 0) |
| #define | f_year(x) rb_funcall(x, rb_intern("year"), 0) |
| #define | f_mon(x) rb_funcall(x, rb_intern("mon"), 0) |
| #define | f_mday(x) rb_funcall(x, rb_intern("mday"), 0) |
| #define | f_wday(x) rb_funcall(x, rb_intern("wday"), 0) |
| #define | f_hour(x) rb_funcall(x, rb_intern("hour"), 0) |
| #define | f_min(x) rb_funcall(x, rb_intern("min"), 0) |
| #define | f_sec(x) rb_funcall(x, rb_intern("sec"), 0) |
| #define | NDIV(x, y) (-(-((x)+1)/(y))-1) |
| #define | NMOD(x, y) ((y)-(-((x)+1)%(y))-1) |
| #define | DIV(n, d) ((n)<0 ? NDIV((n),(d)) : (n)/(d)) |
| #define | MOD(n, d) ((n)<0 ? NMOD((n),(d)) : (n)%(d)) |
| #define | HAVE_JD (1 << 0) |
| #define | HAVE_DF (1 << 1) |
| #define | HAVE_CIVIL (1 << 2) |
| #define | HAVE_TIME (1 << 3) |
| #define | COMPLEX_DAT (1 << 7) |
| #define | have_jd_p(x) ((x)->flags & HAVE_JD) |
| #define | have_df_p(x) ((x)->flags & HAVE_DF) |
| #define | have_civil_p(x) ((x)->flags & HAVE_CIVIL) |
| #define | have_time_p(x) ((x)->flags & HAVE_TIME) |
| #define | complex_dat_p(x) ((x)->flags & COMPLEX_DAT) |
| #define | simple_dat_p(x) (!complex_dat_p(x)) |
| #define | ITALY 2299161 |
| #define | ENGLAND 2361222 |
| #define | JULIAN positive_inf |
| #define | GREGORIAN negative_inf |
| #define | DEFAULT_SG ITALY |
| #define | UNIX_EPOCH_IN_CJD INT2FIX(2440588) |
| #define | MINUTE_IN_SECONDS 60 |
| #define | HOUR_IN_SECONDS 3600 |
| #define | DAY_IN_SECONDS 86400 |
| #define | SECOND_IN_MILLISECONDS 1000 |
| #define | SECOND_IN_NANOSECONDS 1000000000 |
| #define | JC_PERIOD0 1461 |
| #define | GC_PERIOD0 146097 |
| #define | CM_PERIOD0 71149239 |
| #define | CM_PERIOD (0xfffffff / CM_PERIOD0 * CM_PERIOD0) |
| #define | CM_PERIOD_JCY (CM_PERIOD / JC_PERIOD0 * 4) |
| #define | CM_PERIOD_GCY (CM_PERIOD / GC_PERIOD0 * 400) |
| #define | REFORM_BEGIN_YEAR 1582 |
| #define | REFORM_END_YEAR 1930 |
| #define | REFORM_BEGIN_JD 2298874 |
| #define | REFORM_END_JD 2426355 |
| #define | SEC_WIDTH 6 |
| #define | MIN_WIDTH 6 |
| #define | HOUR_WIDTH 5 |
| #define | MDAY_WIDTH 5 |
| #define | MON_WIDTH 4 |
| #define | SEC_SHIFT 0 |
| #define | MIN_SHIFT SEC_WIDTH |
| #define | HOUR_SHIFT (MIN_WIDTH + SEC_WIDTH) |
| #define | MDAY_SHIFT (HOUR_WIDTH + MIN_WIDTH + SEC_WIDTH) |
| #define | MON_SHIFT (MDAY_WIDTH + HOUR_WIDTH + MIN_WIDTH + SEC_WIDTH) |
| #define | PK_MASK(x) ((1 << (x)) - 1) |
| #define | EX_SEC(x) (((x) >> SEC_SHIFT) & PK_MASK(SEC_WIDTH)) |
| #define | EX_MIN(x) (((x) >> MIN_SHIFT) & PK_MASK(MIN_WIDTH)) |
| #define | EX_HOUR(x) (((x) >> HOUR_SHIFT) & PK_MASK(HOUR_WIDTH)) |
| #define | EX_MDAY(x) (((x) >> MDAY_SHIFT) & PK_MASK(MDAY_WIDTH)) |
| #define | EX_MON(x) (((x) >> MON_SHIFT) & PK_MASK(MON_WIDTH)) |
| #define | PACK5(m, d, h, min, s) |
| #define | PACK2(m, d) (((m) << MON_SHIFT) | ((d) << MDAY_SHIFT)) |
| #define | date_sg_t double |
| #define | get_d1(x) |
| #define | get_d1a(x) |
| #define | get_d1b(x) |
| #define | get_d2(x, y) |
| #define | set_to_simple(x, _nth, _jd,_sg, _year, _mon, _mday, _flags) |
| #define | set_to_complex(x, _nth, _jd,_df, _sf, _of, _sg, _year, _mon, _mday, _hour, _min, _sec, _flags) |
| #define | copy_simple_to_complex(x, y) |
| #define | copy_complex_to_simple(x, y) |
| #define | canonicalize_jd(_nth, _jd) |
| #define | HALF_DAYS_IN_SECONDS (DAY_IN_SECONDS / 2) |
| #define | decode_offset(of, s, h, m) |
| #define | valid_sg(sg) |
| #define | jd_trunc d_trunc |
| #define | k_trunc d_trunc |
| #define | num2num_with_frac(s, n) |
| #define | num2int_with_frac(s, n) |
| #define | canon24oc() |
| #define | add_frac() |
| #define | val2sg(vsg, dsg) |
| #define | set_hash0(k, v) rb_hash_aset(hash, k, v) |
| #define | ref_hash0(k) rb_hash_aref(hash, k) |
| #define | del_hash0(k) rb_hash_delete(hash, k) |
| #define | set_hash(k, v) rb_hash_aset(hash, ID2SYM(rb_intern(k)), v) |
| #define | ref_hash(k) rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
| #define | del_hash(k) rb_hash_delete(hash, ID2SYM(rb_intern(k))) |
| #define | sym(x) ID2SYM(rb_intern(x)) |
| #define | val2off(vof, iof) |
| #define | SMALLBUF 100 |
| #define | MILLISECOND_IN_NANOSECONDS 1000000 |
| #define | f_getlocal(x) rb_funcall(x, rb_intern("getlocal"), 0) |
| #define | f_subsec(x) rb_funcall(x, rb_intern("subsec"), 0) |
| #define | f_utc_offset(x) rb_funcall(x, rb_intern("utc_offset"), 0) |
| #define | f_local3(x, y, m, d) rb_funcall(x, rb_intern("local"), 3, y, m, d) |
| #define | f_utc6(x, y, m, d, h, min, s) |
| #define | rb_intern(str) rb_intern_const(str) |
| #define | f_public(m, s) |
Functions | |
| static VALUE | f_cmp (VALUE x, VALUE y) |
| static VALUE | f_lt_p (VALUE x, VALUE y) |
| static VALUE | f_gt_p (VALUE x, VALUE y) |
| static VALUE | f_le_p (VALUE x, VALUE y) |
| static VALUE | f_ge_p (VALUE x, VALUE y) |
| static VALUE | f_eqeq_p (VALUE x, VALUE y) |
| static VALUE | f_zero_p (VALUE x) |
| static VALUE | f_negative_p (VALUE x) |
| static VALUE | canon (VALUE x) |
| static int | c_valid_civil_p (int, int, int, double, int *, int *, int *, int *) |
| static int | c_find_fdoy (int y, double sg, int *rjd, int *ns) |
| static int | c_find_ldoy (int y, double sg, int *rjd, int *ns) |
| static int | c_find_ldom (int y, int m, double sg, int *rjd, int *ns) |
| static void | c_civil_to_jd (int y, int m, int d, double sg, int *rjd, int *ns) |
| static void | c_jd_to_civil (int jd, double sg, int *ry, int *rm, int *rdom) |
| static void | c_ordinal_to_jd (int y, int d, double sg, int *rjd, int *ns) |
| static void | c_jd_to_ordinal (int jd, double sg, int *ry, int *rd) |
| static void | c_commercial_to_jd (int y, int w, int d, double sg, int *rjd, int *ns) |
| static void | c_jd_to_commercial (int jd, double sg, int *ry, int *rw, int *rd) |
| static void | c_weeknum_to_jd (int y, int w, int d, int f, double sg, int *rjd, int *ns) |
| static void | c_jd_to_weeknum (int jd, int f, double sg, int *ry, int *rw, int *rd) |
| static int | c_jd_to_wday (int jd) |
| static int | c_valid_ordinal_p (int y, int d, double sg, int *rd, int *rjd, int *ns) |
| static int | c_julian_leap_p (int y) |
| static int | c_gregorian_leap_p (int y) |
| static int | c_julian_last_day_of_month (int y, int m) |
| static int | c_gregorian_last_day_of_month (int y, int m) |
| static int | c_valid_julian_p (int y, int m, int d, int *rm, int *rd) |
| static int | c_valid_gregorian_p (int y, int m, int d, int *rm, int *rd) |
| static int | c_valid_commercial_p (int y, int w, int d, double sg, int *rw, int *rd, int *rjd, int *ns) |
| static int | c_valid_weeknum_p (int y, int w, int d, int f, double sg, int *rw, int *rd, int *rjd, int *ns) |
| static int | c_valid_time_p (int h, int min, int s, int *rh, int *rmin, int *rs) |
| static int | c_valid_start_p (double sg) |
| static int | df_local_to_utc (int df, int of) |
| static int | df_utc_to_local (int df, int of) |
| static int | jd_local_to_utc (int jd, int df, int of) |
| static int | jd_utc_to_local (int jd, int df, int of) |
| static int | time_to_df (int h, int min, int s) |
| static void | df_to_time (int df, int *h, int *min, int *s) |
| static VALUE | sec_to_day (VALUE s) |
| static VALUE | isec_to_day (int s) |
| static VALUE | ns_to_day (VALUE n) |
| static VALUE | ns_to_sec (VALUE n) |
| static int | safe_mul_p (VALUE x, long m) |
| static VALUE | day_to_sec (VALUE d) |
| static VALUE | sec_to_ms (VALUE s) |
| static VALUE | sec_to_ns (VALUE s) |
| static VALUE | div_day (VALUE d, VALUE *f) |
| static VALUE | div_df (VALUE d, VALUE *f) |
| static void | decode_day (VALUE d, VALUE *jd, VALUE *df, VALUE *sf) |
| static double | s_virtual_sg (union DateData *x) |
| static double | c_virtual_sg (union DateData *x) |
| static double | m_virtual_sg (union DateData *x) |
| static void | canonicalize_s_jd (union DateData *x) |
| static void | get_s_jd (union DateData *x) |
| static void | get_s_civil (union DateData *x) |
| static void | get_c_df (union DateData *x) |
| static void | get_c_time (union DateData *x) |
| static void | canonicalize_c_jd (union DateData *x) |
| static void | get_c_jd (union DateData *x) |
| static void | get_c_civil (union DateData *x) |
| static int | local_jd (union DateData *x) |
| static int | local_df (union DateData *x) |
| static void | decode_year (VALUE y, double style, VALUE *nth, int *ry) |
| static void | encode_year (VALUE nth, int y, double style, VALUE *ry) |
| static void | decode_jd (VALUE jd, VALUE *nth, int *rjd) |
| static void | encode_jd (VALUE nth, int jd, VALUE *rjd) |
| static double | guess_style (VALUE y, double sg) |
| static void | m_canonicalize_jd (union DateData *x) |
| static VALUE | m_nth (union DateData *x) |
| static int | m_jd (union DateData *x) |
| static VALUE | m_real_jd (union DateData *x) |
| static int | m_local_jd (union DateData *x) |
| static VALUE | m_real_local_jd (union DateData *x) |
| static int | m_df (union DateData *x) |
| static int | m_local_df (union DateData *x) |
| static VALUE | m_sf (union DateData *x) |
| static VALUE | m_sf_in_sec (union DateData *x) |
| static VALUE | m_fr (union DateData *x) |
| static VALUE | m_ajd (union DateData *x) |
| static VALUE | m_amjd (union DateData *x) |
| static int | m_of (union DateData *x) |
| static VALUE | m_of_in_day (union DateData *x) |
| static double | m_sg (union DateData *x) |
| static int | m_julian_p (union DateData *x) |
| static int | m_gregorian_p (union DateData *x) |
| static int | m_proleptic_julian_p (union DateData *x) |
| static int | m_proleptic_gregorian_p (union DateData *x) |
| static int | m_year (union DateData *x) |
| static VALUE | m_real_year (union DateData *x) |
| static int | m_mon (union DateData *x) |
| static int | m_mday (union DateData *x) |
| static int | c_julian_to_yday (int y, int m, int d) |
| static int | c_gregorian_to_yday (int y, int m, int d) |
| static int | m_yday (union DateData *x) |
| static int | m_wday (union DateData *x) |
| static int | m_cwyear (union DateData *x) |
| static VALUE | m_real_cwyear (union DateData *x) |
| static int | m_cweek (union DateData *x) |
| static int | m_cwday (union DateData *x) |
| static int | m_wnumx (union DateData *x, int f) |
| static int | m_wnum0 (union DateData *x) |
| static int | m_wnum1 (union DateData *x) |
| static int | m_hour (union DateData *x) |
| static int | m_min (union DateData *x) |
| static int | m_sec (union DateData *x) |
| static VALUE | of2str (int of) |
| static VALUE | m_zone (union DateData *x) |
| static VALUE | f_kind_of_p (VALUE x, VALUE c) |
| static VALUE | k_date_p (VALUE x) |
| static VALUE | k_numeric_p (VALUE x) |
| static VALUE | k_rational_p (VALUE x) |
| static int | valid_ordinal_p (VALUE y, int d, double sg, VALUE *nth, int *ry, int *rd, int *rjd, int *ns) |
| static int | valid_gregorian_p (VALUE y, int m, int d, VALUE *nth, int *ry, int *rm, int *rd) |
| static int | valid_civil_p (VALUE y, int m, int d, double sg, VALUE *nth, int *ry, int *rm, int *rd, int *rjd, int *ns) |
| static int | valid_commercial_p (VALUE y, int w, int d, double sg, VALUE *nth, int *ry, int *rw, int *rd, int *rjd, int *ns) |
| static int | valid_weeknum_p (VALUE y, int w, int d, int f, double sg, VALUE *nth, int *ry, int *rw, int *rd, int *rjd, int *ns) |
| VALUE | date_zone_to_diff (VALUE) |
| static int | offset_to_sec (VALUE vof, int *rof) |
| static VALUE | valid_jd_sub (int argc, VALUE *argv, VALUE klass, int need_jd) |
| static VALUE | date_s_valid_jd_p (int argc, VALUE *argv, VALUE klass) |
| static VALUE | valid_civil_sub (int argc, VALUE *argv, VALUE klass, int need_jd) |
| static VALUE | date_s_valid_civil_p (int argc, VALUE *argv, VALUE klass) |
| static VALUE | valid_ordinal_sub (int argc, VALUE *argv, VALUE klass, int need_jd) |
| static VALUE | date_s_valid_ordinal_p (int argc, VALUE *argv, VALUE klass) |
| static VALUE | valid_commercial_sub (int argc, VALUE *argv, VALUE klass, int need_jd) |
| static VALUE | date_s_valid_commercial_p (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s_julian_leap_p (VALUE klass, VALUE y) |
| static VALUE | date_s_gregorian_leap_p (VALUE klass, VALUE y) |
| static void | d_lite_gc_mark (union DateData *dat) |
| static VALUE | d_simple_new_internal (VALUE klass, VALUE nth, int jd, double sg, int y, int m, int d, unsigned flags) |
| static VALUE | d_complex_new_internal (VALUE klass, VALUE nth, int jd, int df, VALUE sf, int of, double sg, int y, int m, int d, int h, int min, int s, unsigned flags) |
| static VALUE | d_lite_s_alloc_simple (VALUE klass) |
| static VALUE | d_lite_s_alloc_complex (VALUE klass) |
| static VALUE | d_lite_s_alloc (VALUE klass) |
| static void | old_to_new (VALUE ajd, VALUE of, VALUE sg, VALUE *rnth, int *rjd, int *rdf, VALUE *rsf, int *rof, double *rsg) |
| static int | wholenum_p (VALUE x) |
| static VALUE | to_integer (VALUE x) |
| static VALUE | d_trunc (VALUE d, VALUE *fr) |
| static VALUE | h_trunc (VALUE h, VALUE *fr) |
| static VALUE | min_trunc (VALUE min, VALUE *fr) |
| static VALUE | s_trunc (VALUE s, VALUE *fr) |
| static VALUE | d_lite_plus (VALUE, VALUE) |
| static VALUE | date_s_jd (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s_ordinal (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s_civil (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s_commercial (int argc, VALUE *argv, VALUE klass) |
| static struct tm * | gmtime_r (const time_t *t, struct tm *tm) |
| static struct tm * | localtime_r (const time_t *t, struct tm *tm) |
| static void | set_sg (union DateData *, double) |
| static VALUE | date_s_today (int argc, VALUE *argv, VALUE klass) |
| static VALUE | rt_rewrite_frags (VALUE hash) |
| static VALUE | d_lite_year (VALUE) |
| static VALUE | d_lite_wday (VALUE) |
| static VALUE | d_lite_jd (VALUE) |
| static VALUE | rt_complete_frags (VALUE klass, VALUE hash) |
| static VALUE | rt__valid_jd_p (VALUE jd, VALUE sg) |
| static VALUE | rt__valid_ordinal_p (VALUE y, VALUE d, VALUE sg) |
| static VALUE | rt__valid_civil_p (VALUE y, VALUE m, VALUE d, VALUE sg) |
| static VALUE | rt__valid_commercial_p (VALUE y, VALUE w, VALUE d, VALUE sg) |
| static VALUE | rt__valid_weeknum_p (VALUE y, VALUE w, VALUE d, VALUE f, VALUE sg) |
| static VALUE | rt__valid_date_frags_p (VALUE hash, VALUE sg) |
| static VALUE | d_new_by_frags (VALUE klass, VALUE hash, VALUE sg) |
| VALUE | date__strptime (const char *str, size_t slen, const char *fmt, size_t flen, VALUE hash) |
| static VALUE | date_s__strptime_internal (int argc, VALUE *argv, VALUE klass, const char *default_fmt) |
| static VALUE | date_s__strptime (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s_strptime (int argc, VALUE *argv, VALUE klass) |
| VALUE | date__parse (VALUE str, VALUE comp) |
| static VALUE | date_s__parse_internal (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s__parse (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s_parse (int argc, VALUE *argv, VALUE klass) |
| VALUE | date__iso8601 (VALUE) |
| VALUE | date__rfc3339 (VALUE) |
| VALUE | date__xmlschema (VALUE) |
| VALUE | date__rfc2822 (VALUE) |
| VALUE | date__httpdate (VALUE) |
| VALUE | date__jisx0301 (VALUE) |
| static VALUE | date_s__iso8601 (VALUE klass, VALUE str) |
| static VALUE | date_s_iso8601 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s__rfc3339 (VALUE klass, VALUE str) |
| static VALUE | date_s_rfc3339 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s__xmlschema (VALUE klass, VALUE str) |
| static VALUE | date_s_xmlschema (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s__rfc2822 (VALUE klass, VALUE str) |
| static VALUE | date_s_rfc2822 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s__httpdate (VALUE klass, VALUE str) |
| static VALUE | date_s_httpdate (int argc, VALUE *argv, VALUE klass) |
| static VALUE | date_s__jisx0301 (VALUE klass, VALUE str) |
| static VALUE | date_s_jisx0301 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | dup_obj (VALUE self) |
| static VALUE | dup_obj_as_complex (VALUE self) |
| static VALUE | d_lite_initialize_copy (VALUE copy, VALUE date) |
| static VALUE | d_lite_ajd (VALUE self) |
| static VALUE | d_lite_amjd (VALUE self) |
| static VALUE | d_lite_mjd (VALUE self) |
| static VALUE | d_lite_ld (VALUE self) |
| static VALUE | d_lite_yday (VALUE self) |
| static VALUE | d_lite_mon (VALUE self) |
| static VALUE | d_lite_mday (VALUE self) |
| static VALUE | d_lite_day_fraction (VALUE self) |
| static VALUE | d_lite_cwyear (VALUE self) |
| static VALUE | d_lite_cweek (VALUE self) |
| static VALUE | d_lite_cwday (VALUE self) |
| static VALUE | d_lite_sunday_p (VALUE self) |
| static VALUE | d_lite_monday_p (VALUE self) |
| static VALUE | d_lite_tuesday_p (VALUE self) |
| static VALUE | d_lite_wednesday_p (VALUE self) |
| static VALUE | d_lite_thursday_p (VALUE self) |
| static VALUE | d_lite_friday_p (VALUE self) |
| static VALUE | d_lite_saturday_p (VALUE self) |
| static VALUE | d_lite_hour (VALUE self) |
| static VALUE | d_lite_min (VALUE self) |
| static VALUE | d_lite_sec (VALUE self) |
| static VALUE | d_lite_sec_fraction (VALUE self) |
| static VALUE | d_lite_offset (VALUE self) |
| static VALUE | d_lite_zone (VALUE self) |
| static VALUE | d_lite_julian_p (VALUE self) |
| static VALUE | d_lite_gregorian_p (VALUE self) |
| static VALUE | d_lite_leap_p (VALUE self) |
| static VALUE | d_lite_start (VALUE self) |
| static void | clear_civil (union DateData *x) |
| static VALUE | dup_obj_with_new_start (VALUE obj, double sg) |
| static VALUE | d_lite_new_start (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_italy (VALUE self) |
| static VALUE | d_lite_england (VALUE self) |
| static VALUE | d_lite_julian (VALUE self) |
| static VALUE | d_lite_gregorian (VALUE self) |
| static void | set_of (union DateData *x, int of) |
| static VALUE | dup_obj_with_new_offset (VALUE obj, int of) |
| static VALUE | d_lite_new_offset (int argc, VALUE *argv, VALUE self) |
| static VALUE | minus_dd (VALUE self, VALUE other) |
| static VALUE | d_lite_minus (VALUE self, VALUE other) |
| static VALUE | d_lite_next_day (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_prev_day (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_next (VALUE self) |
| static VALUE | d_lite_rshift (VALUE self, VALUE other) |
| static VALUE | d_lite_lshift (VALUE self, VALUE other) |
| static VALUE | d_lite_next_month (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_prev_month (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_next_year (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_prev_year (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_cmp (VALUE, VALUE) |
| static VALUE | d_lite_step (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_upto (VALUE self, VALUE max) |
| static VALUE | d_lite_downto (VALUE self, VALUE min) |
| static VALUE | cmp_gen (VALUE self, VALUE other) |
| static VALUE | cmp_dd (VALUE self, VALUE other) |
| static VALUE | equal_gen (VALUE self, VALUE other) |
| static VALUE | d_lite_equal (VALUE self, VALUE other) |
| static VALUE | d_lite_eql_p (VALUE self, VALUE other) |
| static VALUE | d_lite_hash (VALUE self) |
| static void | set_tmx (VALUE, struct tmx *) |
| static VALUE | strftimev (const char *, VALUE, void(*)(VALUE, struct tmx *)) |
| static VALUE | d_lite_to_s (VALUE self) |
| static VALUE | mk_inspect (union DateData *x, const char *klass, const char *to_s) |
| static VALUE | d_lite_inspect (VALUE self) |
| size_t | date_strftime (char *s, size_t maxsize, const char *format, const struct tmx *tmx) |
| static size_t | date_strftime_alloc (char **buf, const char *format, struct tmx *tmx) |
| static VALUE | tmx_m_secs (union DateData *x) |
| static VALUE | tmx_m_msecs (union DateData *x) |
| static int | tmx_m_of (union DateData *x) |
| static char * | tmx_m_zone (union DateData *x) |
| static VALUE | date_strftime_internal (int argc, VALUE *argv, VALUE self, const char *default_fmt, void(*func)(VALUE, struct tmx *)) |
| static VALUE | d_lite_strftime (int argc, VALUE *argv, VALUE self) |
| static VALUE | d_lite_asctime (VALUE self) |
| static VALUE | d_lite_iso8601 (VALUE self) |
| static VALUE | d_lite_rfc3339 (VALUE self) |
| static VALUE | d_lite_rfc2822 (VALUE self) |
| static VALUE | d_lite_httpdate (VALUE self) |
| static VALUE | jisx0301_date (VALUE jd, VALUE y) |
| static VALUE | d_lite_jisx0301 (VALUE self) |
| static VALUE | d_lite_marshal_dump (VALUE self) |
| static VALUE | d_lite_marshal_load (VALUE self, VALUE a) |
| static VALUE | date_s__load (VALUE klass, VALUE s) |
| static VALUE | datetime_s_jd (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_ordinal (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_civil (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_commercial (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_now (int argc, VALUE *argv, VALUE klass) |
| static VALUE | dt_new_by_frags (VALUE klass, VALUE hash, VALUE sg) |
| static VALUE | datetime_s__strptime (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_strptime (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_parse (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_iso8601 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_rfc3339 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_xmlschema (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_rfc2822 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_httpdate (int argc, VALUE *argv, VALUE klass) |
| static VALUE | datetime_s_jisx0301 (int argc, VALUE *argv, VALUE klass) |
| static VALUE | dt_lite_to_s (VALUE self) |
| static VALUE | dt_lite_strftime (int argc, VALUE *argv, VALUE self) |
| static VALUE | iso8601_timediv (VALUE self, VALUE n) |
| static VALUE | dt_lite_iso8601 (int argc, VALUE *argv, VALUE self) |
| static VALUE | dt_lite_rfc3339 (int argc, VALUE *argv, VALUE self) |
| static VALUE | dt_lite_jisx0301 (int argc, VALUE *argv, VALUE self) |
| static VALUE | time_to_time (VALUE self) |
| static VALUE | time_to_date (VALUE self) |
| static VALUE | time_to_datetime (VALUE self) |
| static VALUE | date_to_time (VALUE self) |
| static VALUE | date_to_date (VALUE self) |
| static VALUE | date_to_datetime (VALUE self) |
| static VALUE | datetime_to_time (VALUE self) |
| static VALUE | datetime_to_date (VALUE self) |
| static VALUE | datetime_to_datetime (VALUE self) |
| static VALUE | mk_ary_of_str (long len, const char *a[]) |
| void | Init_date_core (void) |
Variables | |
| static ID | id_cmp |
| static ID | id_le_p |
| static ID | id_ge_p |
| static ID | id_eqeq_p |
| static VALUE | cDate |
| static VALUE | cDateTime |
| static VALUE | half_days_in_day |
| static VALUE | day_in_nanoseconds |
| static double | positive_inf |
| static double | negative_inf |
| static const int | monthtab [2][13] |
| static const int | yeartab [2][13] |
| static struct tmx_funcs | tmx_funcs |
| static const char * | monthnames [] |
| static const char * | abbr_monthnames [] |
| static const char * | daynames [] |
| static const char * | abbr_daynames [] |
| #define add_frac | ( | ) |
Value:
{\
if (f_nonzero_p(fr2))\
ret = d_lite_plus(ret, fr2);\
}
Definition at line 3214 of file date_core.c.
| #define canon24oc | ( | ) |
Value:
Definition at line 3206 of file date_core.c.
| #define canonicalize_jd | ( | _nth, | |||
| _jd | ) |
Value:
{\
if (_jd < 0) {\
_nth = f_sub(_nth, INT2FIX(1));\
_jd += CM_PERIOD;\
}\
if (_jd >= CM_PERIOD) {\
_nth = f_add(_nth, INT2FIX(1));\
_jd -= CM_PERIOD;\
}\
}
Definition at line 1110 of file date_core.c.
Referenced by d_lite_plus().
| #define CM_PERIOD (0xfffffff / CM_PERIOD0 * CM_PERIOD0) |
| #define CM_PERIOD0 71149239 |
Definition at line 181 of file date_core.c.
| #define CM_PERIOD_GCY (CM_PERIOD / GC_PERIOD0 * 400) |
Definition at line 184 of file date_core.c.
| #define CM_PERIOD_JCY (CM_PERIOD / JC_PERIOD0 * 4) |
Definition at line 183 of file date_core.c.
| #define COMPLEX_DAT (1 << 7) |
Definition at line 156 of file date_core.c.
Referenced by d_complex_new_internal(), d_lite_initialize_copy(), d_lite_to_s(), and d_simple_new_internal().
| #define complex_dat_p | ( | x | ) | ((x)->flags & COMPLEX_DAT) |
Definition at line 162 of file date_core.c.
Referenced by d_lite_gregorian(), and d_lite_initialize_copy().
| #define copy_complex_to_simple | ( | x, | |||
| y | ) |
| #define copy_simple_to_complex | ( | x, | |||
| y | ) |
| #define date_sg_t double |
Definition at line 227 of file date_core.c.
| #define DAY_IN_SECONDS 86400 |
Definition at line 175 of file date_core.c.
| #define decode_offset | ( | of, | |||
| s, | |||||
| h, | |||||
| m | ) |
Value:
{\
int a;\
s = (of < 0) ? '-' : '+';\
a = (of < 0) ? -of : of;\
h = a / HOUR_IN_SECONDS;\
m = a % HOUR_IN_SECONDS / MINUTE_IN_SECONDS;\
}
Definition at line 1927 of file date_core.c.
| #define DEFAULT_SG ITALY |
Definition at line 169 of file date_core.c.
Referenced by date_s_httpdate(), date_s_iso8601(), date_s_jisx0301(), date_s_parse(), date_s_rfc2822(), date_s_rfc3339(), date_s_strptime(), date_s_xmlschema(), datetime_s_httpdate(), datetime_s_iso8601(), datetime_s_jisx0301(), datetime_s_parse(), datetime_s_rfc2822(), datetime_s_rfc3339(), datetime_s_strptime(), datetime_s_xmlschema(), and dt_new_by_frags().
| #define del_hash | ( | k | ) | rb_hash_delete(hash, ID2SYM(rb_intern(k))) |
| #define del_hash0 | ( | k | ) | rb_hash_delete(hash, k) |
Definition at line 3657 of file date_core.c.
| #define DIV | ( | n, | |||
| d | ) | ((n)<0 ? NDIV((n),(d)) : (n)/(d)) |
Definition at line 149 of file date_core.c.
Referenced by c_jd_to_wday(), d_lite_plus(), decode_year(), timegm_noleapsecond(), timegmw_noleapsecond(), timetick2integer(), and vm_init_redefined_flag().
| #define ENGLAND 2361222 |
| #define EX_HOUR | ( | x | ) | (((x) >> HOUR_SHIFT) & PK_MASK(HOUR_WIDTH)) |
| #define EX_MDAY | ( | x | ) | (((x) >> MDAY_SHIFT) & PK_MASK(MDAY_WIDTH)) |
Definition at line 209 of file date_core.c.
| #define EX_MIN | ( | x | ) | (((x) >> MIN_SHIFT) & PK_MASK(MIN_WIDTH)) |
| #define EX_MON | ( | x | ) | (((x) >> MON_SHIFT) & PK_MASK(MON_WIDTH)) |
Definition at line 210 of file date_core.c.
| #define EX_SEC | ( | x | ) | (((x) >> SEC_SHIFT) & PK_MASK(SEC_WIDTH)) |
| #define f_abs | ( | x | ) | rb_funcall(x, rb_intern("abs"), 0) |
Definition at line 29 of file date_core.c.
Referenced by f_divide(), f_format(), f_lcm(), float_rationalize(), nucomp_abs(), nucomp_expt(), nucomp_polar(), numeric_polar(), nurat_rationalize(), and rb_flt_rationalize_with_prec().
| #define f_add | ( | x, | |||
| y | ) | rb_funcall(x, '+', 1, y) |
Definition at line 31 of file date_core.c.
Referenced by d_lite_plus(), f_addsub(), f_divide(), nucomp_abs2(), nucomp_add(), nucomp_expt(), nucomp_mul(), nucomp_s_canonicalize_internal(), nucomp_s_convert(), nurat_add(), nurat_rationalize(), nurat_rationalize_internal(), nurat_round(), rb_flt_rationalize(), rb_flt_rationalize_with_prec(), read_num(), and rt_rewrite_frags().
| #define f_add3 | ( | x, | |||
| y, | |||||
| z | ) | f_add(f_add(x, y), z) |
Definition at line 50 of file date_core.c.
| #define f_ajd | ( | x | ) | rb_funcall(x, rb_intern("ajd"), 0) |
Definition at line 136 of file date_core.c.
| #define f_boolcast | ( | x | ) | ((x) ? Qtrue : Qfalse) |
Definition at line 27 of file date_core.c.
| #define f_ceil | ( | x | ) | rb_funcall(x, rb_intern("ceil"), 0) |
| #define f_div | ( | x, | |||
| y | ) | rb_funcall(x, '/', 1, y) |
Definition at line 34 of file date_core.c.
Referenced by f_lcm(), f_round_common(), nucomp_numerator(), nurat_fdiv(), nurat_s_convert(), read_num(), and read_rat_nos().
| #define f_expt | ( | x, | |||
| y | ) | rb_funcall(x, rb_intern("**"), 1, y) |
Definition at line 39 of file date_core.c.
Referenced by date__strptime_internal(), float_to_r(), nucomp_expt(), nurat_expt(), and rb_flt_rationalize().
| #define f_floor | ( | x | ) | rb_funcall(x, rb_intern("floor"), 0) |
Definition at line 40 of file date_core.c.
| #define f_getlocal | ( | x | ) | rb_funcall(x, rb_intern("getlocal"), 0) |
Definition at line 8390 of file date_core.c.
| #define f_hour | ( | x | ) | rb_funcall(x, rb_intern("hour"), 0) |
Definition at line 142 of file date_core.c.
| #define f_idiv | ( | x, | |||
| y | ) | rb_funcall(x, rb_intern("div"), 1, y) |
Definition at line 36 of file date_core.c.
Referenced by f_addsub(), f_muldiv(), nurat_ceil(), nurat_floor(), nurat_round(), nurat_s_canonicalize_internal(), nurat_truncate(), and rt_rewrite_frags().
| #define f_inspect | ( | x | ) | rb_funcall(x, rb_intern("inspect"), 0) |
Definition at line 48 of file date_core.c.
Referenced by nucomp_inspect(), nurat_inspect(), string_to_c_strict(), and string_to_r_strict().
| #define f_jd | ( | x | ) | rb_funcall(x, rb_intern("jd"), 0) |
Definition at line 137 of file date_core.c.
| #define f_local3 | ( | x, | |||
| y, | |||||
| m, | |||||
| d | ) | rb_funcall(x, rb_intern("local"), 3, y, m, d) |
Definition at line 8393 of file date_core.c.
| #define f_mday | ( | x | ) | rb_funcall(x, rb_intern("mday"), 0) |
Definition at line 140 of file date_core.c.
| #define f_min | ( | x | ) | rb_funcall(x, rb_intern("min"), 0) |
Definition at line 143 of file date_core.c.
| #define f_mod | ( | x, | |||
| y | ) | rb_funcall(x, '%', 1, y) |
| #define f_mon | ( | x | ) | rb_funcall(x, rb_intern("mon"), 0) |
Definition at line 139 of file date_core.c.
| #define f_mul | ( | x, | |||
| y | ) | rb_funcall(x, '*', 1, y) |
Definition at line 33 of file date_core.c.
Referenced by f_addsub(), f_complex_polar(), f_divide(), f_lcm(), f_muldiv(), f_round_common(), float_to_r(), imp1(), m_ajd(), m_sin(), nucomp_abs2(), nucomp_expt(), nucomp_mul(), nucomp_numerator(), nucomp_s_convert(), numeric_abs2(), nurat_cmp(), nurat_mul(), nurat_rationalize_internal(), nurat_round(), rb_flt_rationalize(), and read_num().
| #define f_negate | ( | x | ) | rb_funcall(x, rb_intern("-@"), 0) |
Definition at line 30 of file date_core.c.
Referenced by d_lite_minus(), date__strptime_internal(), f_divide(), f_gcd_normal(), f_muldiv(), float_rationalize(), imp1(), nucomp_conj(), nucomp_expt(), nucomp_negate(), nurat_ceil(), nurat_expt(), nurat_rationalize(), nurat_round(), nurat_s_canonicalize_internal(), nurat_s_canonicalize_internal_no_reduce(), nurat_truncate(), and read_num().
| #define f_nonzero_p | ( | x | ) | (!f_zero_p(x)) |
Definition at line 124 of file date_core.c.
| #define f_positive_p | ( | x | ) | (!f_negative_p(x)) |
Definition at line 134 of file date_core.c.
| #define f_public | ( | m, | |||
| s | ) |
| #define f_quo | ( | x, | |||
| y | ) | rb_funcall(x, rb_intern("quo"), 1, y) |
Definition at line 35 of file date_core.c.
Referenced by f_reciprocal(), isec_to_day(), and nucomp_div().
| #define f_remainder | ( | x, | |||
| y | ) | rb_funcall(x, rb_intern("remainder"), 1, y) |
Definition at line 38 of file date_core.c.
| #define f_round | ( | x | ) | rb_funcall(x, rb_intern("round"), 0) |
Definition at line 43 of file date_core.c.
| #define f_sec | ( | x | ) | rb_funcall(x, rb_intern("sec"), 0) |
Definition at line 144 of file date_core.c.
| #define f_sub | ( | x, | |||
| y | ) | rb_funcall(x, '-', 1, y) |
Definition at line 32 of file date_core.c.
Referenced by d_lite_jd(), d_lite_mjd(), f_addsub(), f_divide(), m_ajd(), nucomp_expt(), nucomp_mul(), nucomp_s_canonicalize_internal(), nucomp_sub(), nurat_cmp(), nurat_rationalize(), nurat_rationalize_internal(), nurat_sub(), rb_flt_rationalize(), and rb_flt_rationalize_with_prec().
| #define f_sub3 | ( | x, | |||
| y, | |||||
| z | ) | f_sub(f_sub(x, y), z) |
Definition at line 51 of file date_core.c.
| #define f_subsec | ( | x | ) | rb_funcall(x, rb_intern("subsec"), 0) |
Definition at line 8391 of file date_core.c.
| #define f_to_i | ( | x | ) | rb_funcall(x, rb_intern("to_i"), 0) |
Definition at line 45 of file date_core.c.
Referenced by f_round_common(), nucomp_to_i(), and nurat_int_value().
| #define f_to_r | ( | x | ) | rb_funcall(x, rb_intern("to_r"), 0) |
Definition at line 46 of file date_core.c.
Referenced by float_to_r(), nucomp_to_r(), numeric_denominator(), numeric_numerator(), nurat_s_convert(), rb_flt_rationalize(), and rb_flt_rationalize_with_prec().
| #define f_to_s | ( | x | ) | rb_funcall(x, rb_intern("to_s"), 0) |
Definition at line 47 of file date_core.c.
Referenced by nucomp_rationalize(), nucomp_to_f(), nucomp_to_i(), nucomp_to_r(), nucomp_to_s(), and nurat_to_s().
| #define f_truncate | ( | x | ) | rb_funcall(x, rb_intern("truncate"), 0) |
Definition at line 42 of file date_core.c.
| #define f_utc6 | ( | x, | |||
| y, | |||||
| m, | |||||
| d, | |||||
| h, | |||||
| min, | |||||
| s | ) |
Value:
rb_funcall(x, rb_intern("utc"), 6,\ y, m, d, h, min, s)
Definition at line 8394 of file date_core.c.
| #define f_utc_offset | ( | x | ) | rb_funcall(x, rb_intern("utc_offset"), 0) |
Definition at line 8392 of file date_core.c.
| #define f_wday | ( | x | ) | rb_funcall(x, rb_intern("wday"), 0) |
Definition at line 141 of file date_core.c.
| #define f_year | ( | x | ) | rb_funcall(x, rb_intern("year"), 0) |
Definition at line 138 of file date_core.c.
| #define GC_PERIOD0 146097 |
Definition at line 180 of file date_core.c.
| #define get_d1 | ( | x | ) |
Value:
union DateData *dat;\ Data_Get_Struct(x, union DateData, dat);
Definition at line 287 of file date_core.c.
Referenced by d_lite_ajd(), d_lite_amjd(), d_lite_cwday(), d_lite_cweek(), d_lite_cwyear(), d_lite_friday_p(), d_lite_gregorian_p(), d_lite_hour(), d_lite_jd(), d_lite_julian_p(), d_lite_ld(), d_lite_mday(), d_lite_min(), d_lite_mjd(), d_lite_mon(), d_lite_monday_p(), d_lite_offset(), d_lite_saturday_p(), d_lite_sec(), d_lite_sec_fraction(), d_lite_sunday_p(), d_lite_thursday_p(), d_lite_tuesday_p(), d_lite_wday(), d_lite_wednesday_p(), d_lite_yday(), d_lite_year(), and d_lite_zone().
| #define get_d1a | ( | x | ) |
Value:
union DateData *adat;\ Data_Get_Struct(x, union DateData, adat);
Definition at line 291 of file date_core.c.
Referenced by date_to_date().
| #define get_d1b | ( | x | ) |
Value:
union DateData *bdat;\ Data_Get_Struct(x, union DateData, bdat);
Definition at line 295 of file date_core.c.
| #define get_d2 | ( | x, | |||
| y | ) |
Value:
union DateData *adat, *bdat;\ Data_Get_Struct(x, union DateData, adat);\ Data_Get_Struct(y, union DateData, bdat);
Definition at line 299 of file date_core.c.
Referenced by d_lite_cmp(), d_lite_equal(), and d_lite_initialize_copy().
| #define GREGORIAN negative_inf |
| #define HALF_DAYS_IN_SECONDS (DAY_IN_SECONDS / 2) |
Definition at line 1555 of file date_core.c.
| #define HAVE_CIVIL (1 << 2) |
| #define have_civil_p | ( | x | ) | ((x)->flags & HAVE_CIVIL) |
Definition at line 160 of file date_core.c.
Referenced by d_complex_new_internal(), and d_simple_new_internal().
| #define HAVE_DF (1 << 1) |
| #define have_df_p | ( | x | ) | ((x)->flags & HAVE_DF) |
| #define HAVE_JD (1 << 0) |
| #define have_jd_p | ( | x | ) | ((x)->flags & HAVE_JD) |
Definition at line 158 of file date_core.c.
Referenced by d_complex_new_internal(), and d_simple_new_internal().
| #define HAVE_TIME (1 << 3) |
| #define have_time_p | ( | x | ) | ((x)->flags & HAVE_TIME) |
| #define HOUR_IN_SECONDS 3600 |
| #define HOUR_SHIFT (MIN_WIDTH + SEC_WIDTH) |
Definition at line 200 of file date_core.c.
| #define HOUR_WIDTH 5 |
Definition at line 194 of file date_core.c.
| #define ITALY 2299161 |
Definition at line 165 of file date_core.c.
| #define JC_PERIOD0 1461 |
Definition at line 179 of file date_core.c.
| #define jd_trunc d_trunc |
Definition at line 3132 of file date_core.c.
| #define JULIAN positive_inf |
| #define k_trunc d_trunc |
Definition at line 3133 of file date_core.c.
| #define MDAY_SHIFT (HOUR_WIDTH + MIN_WIDTH + SEC_WIDTH) |
Definition at line 201 of file date_core.c.
| #define MDAY_WIDTH 5 |
Definition at line 195 of file date_core.c.
| #define MILLISECOND_IN_NANOSECONDS 1000000 |
Definition at line 6568 of file date_core.c.
| #define MIN_SHIFT SEC_WIDTH |
Definition at line 199 of file date_core.c.
| #define MIN_WIDTH 6 |
Definition at line 193 of file date_core.c.
| #define MINUTE_IN_SECONDS 60 |
| #define MOD | ( | n, | |||
| d | ) | ((n)<0 ? NMOD((n),(d)) : (n)%(d)) |
Definition at line 150 of file date_core.c.
Referenced by c_julian_leap_p(), calc_tm_yday(), d_lite_plus(), decode_year(), and vm_init_redefined_flag().
| #define MON_SHIFT (MDAY_WIDTH + HOUR_WIDTH + MIN_WIDTH + SEC_WIDTH) |
Definition at line 202 of file date_core.c.
| #define MON_WIDTH 4 |
Definition at line 196 of file date_core.c.
| #define NDEBUG |
Definition at line 13 of file date_core.c.
| #define NDIV | ( | x, | |||
| y | ) | (-(-((x)+1)/(y))-1) |
| #define NMOD | ( | x, | |||
| y | ) | ((y)-(-((x)+1)%(y))-1) |
Definition at line 148 of file date_core.c.
| #define num2int_with_frac | ( | s, | |||
| n | ) |
Value:
{\
s = NUM2INT(s##_trunc(v##s, &fr));\
if (f_nonzero_p(fr)) {\
if (argc > n)\
rb_raise(rb_eArgError, "invalid fraction");\
fr2 = fr;\
}\
}
Definition at line 3196 of file date_core.c.
| #define num2num_with_frac | ( | s, | |||
| n | ) |
Value:
{\
s = s##_trunc(v##s, &fr);\
if (f_nonzero_p(fr)) {\
if (argc > n)\
rb_raise(rb_eArgError, "invalid fraction");\
fr2 = fr;\
}\
}
Definition at line 3186 of file date_core.c.
| #define PACK2 | ( | m, | |||
| d | ) | (((m) << MON_SHIFT) | ((d) << MDAY_SHIFT)) |
Definition at line 216 of file date_core.c.
| #define PACK5 | ( | m, | |||
| d, | |||||
| h, | |||||
| min, | |||||
| s | ) |
Value:
(((m) << MON_SHIFT) | ((d) << MDAY_SHIFT) |\ ((h) << HOUR_SHIFT) | ((min) << MIN_SHIFT) | ((s) << SEC_SHIFT))
Definition at line 212 of file date_core.c.
| #define PK_MASK | ( | x | ) | ((1 << (x)) - 1) |
Definition at line 204 of file date_core.c.
| #define rb_intern | ( | str | ) | rb_intern_const(str) |
| #define ref_hash | ( | k | ) | rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
Definition at line 3660 of file date_core.c.
| #define ref_hash0 | ( | k | ) | rb_hash_aref(hash, k) |
Definition at line 3656 of file date_core.c.
| #define REFORM_BEGIN_JD 2298874 |
Definition at line 188 of file date_core.c.
| #define REFORM_BEGIN_YEAR 1582 |
| #define REFORM_END_JD 2426355 |
Definition at line 189 of file date_core.c.
| #define REFORM_END_YEAR 1930 |
| #define SEC_SHIFT 0 |
Definition at line 198 of file date_core.c.
| #define SEC_WIDTH 6 |
Definition at line 192 of file date_core.c.
| #define SECOND_IN_MILLISECONDS 1000 |
Definition at line 176 of file date_core.c.
| #define SECOND_IN_NANOSECONDS 1000000000 |
Definition at line 177 of file date_core.c.
| #define set_hash | ( | k, | |||
| v | ) | rb_hash_aset(hash, ID2SYM(rb_intern(k)), v) |
Definition at line 3659 of file date_core.c.
Referenced by date__strptime_internal(), parse_frag_cb(), and rt_rewrite_frags().
| #define set_hash0 | ( | k, | |||
| v | ) | rb_hash_aset(hash, k, v) |
Definition at line 3655 of file date_core.c.
| #define set_to_complex | ( | x, | |||
| _nth, | |||||
| _jd, | |||||
| _df, | |||||
| _sf, | |||||
| _of, | |||||
| _sg, | |||||
| _year, | |||||
| _mon, | |||||
| _mday, | |||||
| _hour, | |||||
| _min, | |||||
| _sec, | |||||
| _flags | ) |
Value:
{\
(x)->nth = canon(_nth);\
(x)->jd = _jd;\
(x)->df = _df;\
(x)->sf = canon(_sf);\
(x)->of = _of;\
(x)->sg = (date_sg_t)(_sg);\
(x)->year = _year;\
(x)->pc = PACK5(_mon, _mday, _hour, _min, _sec);\
(x)->flags = _flags;\
}
Definition at line 358 of file date_core.c.
Referenced by d_complex_new_internal().
| #define set_to_simple | ( | x, | |||
| _nth, | |||||
| _jd, | |||||
| _sg, | |||||
| _year, | |||||
| _mon, | |||||
| _mday, | |||||
| _flags | ) |
Value:
{\
(x)->nth = canon(_nth);\
(x)->jd = _jd;\
(x)->sg = (date_sg_t)(_sg);\
(x)->year = _year;\
(x)->pc = PACK2(_mon, _mday);\
(x)->flags = _flags;\
}
Definition at line 327 of file date_core.c.
Referenced by d_simple_new_internal().
| #define simple_dat_p | ( | x | ) | (!complex_dat_p(x)) |
Definition at line 163 of file date_core.c.
Referenced by d_lite_cmp(), d_lite_initialize_copy(), d_lite_mday(), d_lite_plus(), d_lite_start(), date_to_date(), m_of_in_day(), m_sf_in_sec(), and m_wnum1().
| #define SMALLBUF 100 |
Definition at line 6516 of file date_core.c.
Referenced by d_lite_strftime(), rb_strftime_alloc(), strftimev(), and time_strftime().
| #define sym | ( | x | ) | ID2SYM(rb_intern(x)) |
Definition at line 3695 of file date_core.c.
Referenced by check_local_id(), cv_list_i(), iseq_build_from_ary_body(), list_i(), mnew_from_me(), rb_call_inits(), rb_dlptr_initialize(), rb_dlptr_s_malloc(), rb_fiddle_ptr_initialize(), rb_fiddle_ptr_s_malloc(), rb_threadptr_pending_interrupt_check_mask(), recursive_list_access(), register_label(), rt_complete_frags(), symbol2event_flag(), tracepoint_inspect(), vm_call_opt_send(), and w_symbol().
| #define UNIX_EPOCH_IN_CJD INT2FIX(2440588) |
| #define USE_PACK |
| #define val2off | ( | vof, | |||
| iof | ) |
Value:
{\
if (!offset_to_sec(vof, &iof)) {\
iof = 0;\
rb_warning("invalid offset is ignored");\
}\
}
Definition at line 4661 of file date_core.c.
| #define val2sg | ( | vsg, | |||
| dsg | ) |
Value:
{\
dsg = NUM2DBL(vsg);\
if (!c_valid_start_p(dsg)) {\
dsg = DEFAULT_SG;\
rb_warning("invalid start is ignored");\
}\
}
Definition at line 3220 of file date_core.c.
| #define valid_sg | ( | sg | ) |
Value:
{\
if (!c_valid_start_p(sg)) {\
sg = 0;\
rb_warning("invalid start is ignored");\
}\
}
Definition at line 2413 of file date_core.c.
| static void c_civil_to_jd | ( | int | y, | |
| int | m, | |||
| int | d, | |||
| double | sg, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 479 of file date_core.c.
Referenced by datetime_to_datetime(), and k_rational_p().
| static void c_commercial_to_jd | ( | int | y, | |
| int | w, | |||
| int | d, | |||
| double | sg, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
| static int c_find_fdoy | ( | int | y, | |
| double | sg, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 433 of file date_core.c.
| static int c_find_ldom | ( | int | y, | |
| int | m, | |||
| double | sg, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
| static int c_find_ldoy | ( | int | y, | |
| double | sg, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
| static int c_gregorian_last_day_of_month | ( | int | y, | |
| int | m | |||
| ) | [static] |
| static int c_gregorian_leap_p | ( | int | y | ) | [inline, static] |
Definition at line 683 of file date_core.c.
References assert, and c_julian_leap_p().
Referenced by c_julian_last_day_of_month(), and c_julian_to_yday().
| static int c_gregorian_to_yday | ( | int | y, | |
| int | m, | |||
| int | d | |||
| ) | [static] |
Definition at line 1781 of file date_core.c.
| static void c_jd_to_civil | ( | int | jd, | |
| double | sg, | |||
| int * | ry, | |||
| int * | rm, | |||
| int * | rdom | |||
| ) | [static] |
Definition at line 503 of file date_core.c.
Referenced by c_jd_to_wday(), c_valid_civil_p(), and datetime_to_datetime().
| static void c_jd_to_commercial | ( | int | jd, | |
| double | sg, | |||
| int * | ry, | |||
| int * | rw, | |||
| int * | rd | |||
| ) | [static] |
| static void c_jd_to_ordinal | ( | int | jd, | |
| double | sg, | |||
| int * | ry, | |||
| int * | rd | |||
| ) | [static] |
| static int c_jd_to_wday | ( | int | jd | ) | [inline, static] |
| static void c_jd_to_weeknum | ( | int | jd, | |
| int | f, | |||
| double | sg, | |||
| int * | ry, | |||
| int * | rw, | |||
| int * | rd | |||
| ) | [static] |
| static int c_julian_last_day_of_month | ( | int | y, | |
| int | m | |||
| ) | [static] |
| static int c_julian_leap_p | ( | int | y | ) | [inline, static] |
| static int c_julian_to_yday | ( | int | y, | |
| int | m, | |||
| int | d | |||
| ) | [static] |
| static void c_ordinal_to_jd | ( | int | y, | |
| int | d, | |||
| double | sg, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 533 of file date_core.c.
| static int c_valid_civil_p | ( | int | , | |
| int | , | |||
| int | , | |||
| double | , | |||
| int * | , | |||
| int * | , | |||
| int * | , | |||
| int * | ||||
| ) | [static] |
| static int c_valid_commercial_p | ( | int | y, | |
| int | w, | |||
| int | d, | |||
| double | sg, | |||
| int * | rw, | |||
| int * | rd, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 764 of file date_core.c.
References c_commercial_to_jd(), and c_jd_to_commercial().
| static int c_valid_gregorian_p | ( | int | y, | |
| int | m, | |||
| int | d, | |||
| int * | rm, | |||
| int * | rd | |||
| ) | [static] |
Definition at line 722 of file date_core.c.
| static int c_valid_julian_p | ( | int | y, | |
| int | m, | |||
| int | d, | |||
| int * | rm, | |||
| int * | rd | |||
| ) | [static] |
Definition at line 703 of file date_core.c.
| static int c_valid_ordinal_p | ( | int | y, | |
| int | d, | |||
| double | sg, | |||
| int * | rd, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
| static int c_valid_start_p | ( | double | sg | ) | [inline, static] |
Definition at line 860 of file date_core.c.
| static int c_valid_time_p | ( | int | h, | |
| int | min, | |||
| int | s, | |||
| int * | rh, | |||
| int * | rmin, | |||
| int * | rs | |||
| ) | [static] |
Definition at line 842 of file date_core.c.
| static int c_valid_weeknum_p | ( | int | y, | |
| int | w, | |||
| int | d, | |||
| int | f, | |||
| double | sg, | |||
| int * | rw, | |||
| int * | rd, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
| static double c_virtual_sg | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1090 of file date_core.c.
| static void c_weeknum_to_jd | ( | int | y, | |
| int | w, | |||
| int | d, | |||
| int | f, | |||
| double | sg, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
| static VALUE canon | ( | VALUE | x | ) | [inline, static] |
Definition at line 305 of file date_core.c.
| static void canonicalize_c_jd | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1217 of file date_core.c.
| static void canonicalize_s_jd | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1123 of file date_core.c.
| static void clear_civil | ( | union DateData * | x | ) | [static] |
Definition at line 5294 of file date_core.c.
| static VALUE cmp_dd | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
| static VALUE cmp_gen | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
| static VALUE d_complex_new_internal | ( | VALUE | klass, | |
| VALUE | nth, | |||
| int | jd, | |||
| int | df, | |||
| VALUE | sf, | |||
| int | of, | |||
| double | sg, | |||
| int | y, | |||
| int | m, | |||
| int | d, | |||
| int | h, | |||
| int | min, | |||
| int | s, | |||
| unsigned | flags | |||
| ) | [inline, static] |
Definition at line 2956 of file date_core.c.
References assert, COMPLEX_DAT, d_lite_gc_mark(), Data_Make_Struct, have_civil_p, have_df_p, have_jd_p, have_time_p, set_to_complex, and VALUE.
Referenced by d_lite_plus().
| static VALUE d_lite_ajd | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_amjd | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_asctime | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_cmp | ( | VALUE | , | |
| VALUE | ||||
| ) | [static] |
Definition at line 6253 of file date_core.c.
References cmp_dd(), f_eqeq_p(), f_lt_p, get_d2, INT2FIX, m_canonicalize_jd(), m_gregorian_p(), m_jd(), m_nth(), simple_dat_p, and VALUE.
| static VALUE d_lite_cwday | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_cweek | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_cwyear | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_day_fraction | ( | VALUE | self | ) | [static] |
Definition at line 4932 of file date_core.c.
| static VALUE d_lite_downto | ( | VALUE | self, | |
| VALUE | min | |||
| ) | [static] |
| static VALUE d_lite_england | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_eql_p | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
Definition at line 6357 of file date_core.c.
| static VALUE d_lite_equal | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
Definition at line 6326 of file date_core.c.
References equal_gen(), f_eqeq_p(), get_d2, m_canonicalize_jd(), m_gregorian_p(), m_local_jd(), m_nth(), Qfalse, Qtrue, and VALUE.
| static VALUE d_lite_friday_p | ( | VALUE | self | ) | [static] |
| static void d_lite_gc_mark | ( | union DateData * | dat | ) | [static] |
Definition at line 2925 of file date_core.c.
Referenced by d_complex_new_internal(), and d_simple_new_internal().
| static VALUE d_lite_gregorian | ( | VALUE | self | ) | [static] |
Definition at line 5414 of file date_core.c.
References assert, complex_dat_p, get_c_df(), and get_c_jd().
| static VALUE d_lite_gregorian_p | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_hash | ( | VALUE | self | ) | [static] |
Definition at line 6366 of file date_core.c.
| static VALUE d_lite_hour | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_httpdate | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_initialize_copy | ( | VALUE | copy, | |
| VALUE | date | |||
| ) | [static] |
Definition at line 4731 of file date_core.c.
References COMPLEX_DAT, complex_dat_p, get_d2, rb_eArgError, rb_raise(), and simple_dat_p.
| static VALUE d_lite_inspect | ( | VALUE | self | ) | [static] |
Definition at line 6499 of file date_core.c.
| static VALUE d_lite_iso8601 | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_italy | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_jd | ( | VALUE | ) | [static] |
Definition at line 4821 of file date_core.c.
References f_sub, get_d1, INT2FIX, and m_real_local_jd().
| static VALUE d_lite_jisx0301 | ( | VALUE | self | ) | [static] |
Definition at line 6983 of file date_core.c.
| static VALUE d_lite_julian | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_julian_p | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_ld | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_leap_p | ( | VALUE | self | ) | [static] |
Definition at line 5263 of file date_core.c.
| static VALUE d_lite_lshift | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
| static VALUE d_lite_marshal_dump | ( | VALUE | self | ) | [static] |
Definition at line 7017 of file date_core.c.
| static VALUE d_lite_marshal_load | ( | VALUE | self, | |
| VALUE | a | |||
| ) | [static] |
Definition at line 7041 of file date_core.c.
| static VALUE d_lite_mday | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_min | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_minus | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
Definition at line 5867 of file date_core.c.
References d_lite_plus(), DBL2NUM, f_negate, FIX2LONG, k_numeric_p(), LONG2NUM, rb_eTypeError, rb_raise(), RFLOAT_VALUE, T_BIGNUM, T_FIXNUM, T_FLOAT, and T_RATIONAL.
| static VALUE d_lite_mjd | ( | VALUE | self | ) | [static] |
Definition at line 4838 of file date_core.c.
References f_sub, get_d1, INT2FIX, and m_real_local_jd().
| static VALUE d_lite_mon | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_monday_p | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_new_offset | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 5451 of file date_core.c.
| static VALUE d_lite_new_start | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 5357 of file date_core.c.
| static VALUE d_lite_next | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_next_day | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 5894 of file date_core.c.
| static VALUE d_lite_next_month | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 6008 of file date_core.c.
| static VALUE d_lite_next_year | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 6042 of file date_core.c.
| static VALUE d_lite_offset | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_plus | ( | VALUE | , | |
| VALUE | ||||
| ) | [static] |
Definition at line 5482 of file date_core.c.
References DateData::c, canonicalize_jd, CM_PERIOD, d_complex_new_internal(), d_simple_new_internal(), ComplexDateData::df, DIV, EX_HOUR, EX_MIN, EX_SEC, f_add, FIX2LONG, ComplexDateData::flags, SimpleDateData::flags, HAVE_CIVIL, HAVE_JD, INT2FIX, m_jd(), m_nth(), MOD, ComplexDateData::of, ComplexDateData::pc, rb_obj_class(), DateData::s, ComplexDateData::sf, ComplexDateData::sg, SimpleDateData::sg, simple_dat_p, USE_PACK, and VALUE.
Referenced by d_lite_downto(), d_lite_minus(), and d_lite_upto().
| static VALUE d_lite_prev_day | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 5911 of file date_core.c.
| static VALUE d_lite_prev_month | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 6025 of file date_core.c.
| static VALUE d_lite_prev_year | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 6059 of file date_core.c.
| static VALUE d_lite_rfc2822 | ( | VALUE | self | ) | [static] |
Definition at line 6929 of file date_core.c.
References dup_obj_with_new_offset(), set_tmx(), and strftimev().
| static VALUE d_lite_rfc3339 | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_rshift | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
Definition at line 5946 of file date_core.c.
| static VALUE d_lite_s_alloc | ( | VALUE | klass | ) | [static] |
| static VALUE d_lite_s_alloc_complex | ( | VALUE | klass | ) | [static] |
Definition at line 2989 of file date_core.c.
| static VALUE d_lite_s_alloc_simple | ( | VALUE | klass | ) | [static] |
Definition at line 2979 of file date_core.c.
| static VALUE d_lite_saturday_p | ( | VALUE | self | ) | [static] |
Definition at line 5102 of file date_core.c.
References get_d1, m_local_jd(), m_mon(), m_virtual_sg(), m_wday(), m_year(), NUM2INT, Qfalse, and Qtrue.
| static VALUE d_lite_sec | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_sec_fraction | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_start | ( | VALUE | self | ) | [static] |
Definition at line 5287 of file date_core.c.
References DateData::s, simple_dat_p, and SimpleDateData::year.
| static VALUE d_lite_step | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 6083 of file date_core.c.
| static VALUE d_lite_strftime | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
| static VALUE d_lite_sunday_p | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_thursday_p | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_to_s | ( | VALUE | self | ) | [static] |
Definition at line 6394 of file date_core.c.
References COMPLEX_DAT, DateData::flags, HAVE_CIVIL, HAVE_DF, HAVE_JD, HAVE_TIME, rb_enc_sprintf(), and rb_usascii_encoding().
| static VALUE d_lite_tuesday_p | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_upto | ( | VALUE | self, | |
| VALUE | max | |||
| ) | [static] |
| static VALUE d_lite_wday | ( | VALUE | ) | [static] |
| static VALUE d_lite_wednesday_p | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_yday | ( | VALUE | self | ) | [static] |
| static VALUE d_lite_year | ( | VALUE | ) | [static] |
| static VALUE d_lite_zone | ( | VALUE | self | ) | [static] |
| static VALUE d_new_by_frags | ( | VALUE | klass, | |
| VALUE | hash, | |||
| VALUE | sg | |||
| ) | [static] |
Definition at line 4106 of file date_core.c.
| static VALUE d_simple_new_internal | ( | VALUE | klass, | |
| VALUE | nth, | |||
| int | jd, | |||
| double | sg, | |||
| int | y, | |||
| int | m, | |||
| int | d, | |||
| unsigned | flags | |||
| ) | [inline, static] |
Definition at line 2937 of file date_core.c.
References assert, COMPLEX_DAT, d_lite_gc_mark(), Data_Make_Struct, have_civil_p, have_jd_p, set_to_simple, and VALUE.
Referenced by d_lite_plus().
| static VALUE d_trunc | ( | VALUE | d, | |
| VALUE * | fr | |||
| ) | [inline, static] |
Definition at line 3117 of file date_core.c.
| VALUE date__httpdate | ( | VALUE | ) |
Definition at line 3033 of file date_parse.c.
| VALUE date__iso8601 | ( | VALUE | ) |
Definition at line 2600 of file date_parse.c.
| VALUE date__jisx0301 | ( | VALUE | ) |
Definition at line 3107 of file date_parse.c.
| VALUE date__parse | ( | VALUE | str, | |
| VALUE | comp | |||
| ) |
Definition at line 2179 of file date_parse.c.
| VALUE date__rfc2822 | ( | VALUE | ) |
Definition at line 2887 of file date_parse.c.
| VALUE date__rfc3339 | ( | VALUE | ) |
Definition at line 2668 of file date_parse.c.
| VALUE date__strptime | ( | const char * | str, | |
| size_t | slen, | |||
| const char * | fmt, | |||
| size_t | flen, | |||
| VALUE | hash | |||
| ) |
Definition at line 649 of file date_strptime.c.
| VALUE date__xmlschema | ( | VALUE | ) |
Definition at line 2814 of file date_parse.c.
| static VALUE date_s__httpdate | ( | VALUE | klass, | |
| VALUE | str | |||
| ) | [static] |
| static VALUE date_s__iso8601 | ( | VALUE | klass, | |
| VALUE | str | |||
| ) | [static] |
| static VALUE date_s__jisx0301 | ( | VALUE | klass, | |
| VALUE | str | |||
| ) | [static] |
| static VALUE date_s__load | ( | VALUE | klass, | |
| VALUE | s | |||
| ) | [static] |
Definition at line 7129 of file date_core.c.
| static VALUE date_s__parse | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s__parse_internal | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 4267 of file date_core.c.
| static VALUE date_s__rfc2822 | ( | VALUE | klass, | |
| VALUE | str | |||
| ) | [static] |
| static VALUE date_s__rfc3339 | ( | VALUE | klass, | |
| VALUE | str | |||
| ) | [static] |
| static VALUE date_s__strptime | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s__strptime_internal | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass, | |||
| const char * | default_fmt | |||
| ) | [static] |
Definition at line 4151 of file date_core.c.
| static VALUE date_s__xmlschema | ( | VALUE | klass, | |
| VALUE | str | |||
| ) | [static] |
| static VALUE date_s_civil | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 3363 of file date_core.c.
| static VALUE date_s_commercial | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 3440 of file date_core.c.
| static VALUE date_s_gregorian_leap_p | ( | VALUE | klass, | |
| VALUE | y | |||
| ) | [static] |
Definition at line 2915 of file date_core.c.
| static VALUE date_s_httpdate | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s_iso8601 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s_jd | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 3245 of file date_core.c.
| static VALUE date_s_jisx0301 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s_julian_leap_p | ( | VALUE | klass, | |
| VALUE | y | |||
| ) | [static] |
Definition at line 2894 of file date_core.c.
| static VALUE date_s_ordinal | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 3295 of file date_core.c.
| static VALUE date_s_parse | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 4330 of file date_core.c.
References DEFAULT_SG, INT2FIX, Qtrue, and rb_str_new2.
| static VALUE date_s_rfc2822 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s_rfc3339 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s_strptime | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE date_s_today | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 3616 of file date_core.c.
| static VALUE date_s_valid_civil_p | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 2548 of file date_core.c.
| static VALUE date_s_valid_commercial_p | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 2711 of file date_core.c.
| static VALUE date_s_valid_jd_p | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 2459 of file date_core.c.
| static VALUE date_s_valid_ordinal_p | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 2629 of file date_core.c.
| static VALUE date_s_xmlschema | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| size_t date_strftime | ( | char * | s, | |
| size_t | maxsize, | |||
| const char * | format, | |||
| const struct tmx * | tmx | |||
| ) |
| static size_t date_strftime_alloc | ( | char ** | buf, | |
| const char * | format, | |||
| struct tmx * | tmx | |||
| ) | [static] |
Definition at line 6518 of file date_core.c.
| static VALUE date_strftime_internal | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self, | |||
| const char * | default_fmt, | |||
| void(*)(VALUE, struct tmx *) | func | |||
| ) | [static] |
| static VALUE date_to_date | ( | VALUE | self | ) | [static] |
| static VALUE date_to_datetime | ( | VALUE | self | ) | [static] |
Definition at line 8516 of file date_core.c.
| static VALUE date_to_time | ( | VALUE | self | ) | [static] |
Definition at line 8487 of file date_core.c.
| VALUE date_zone_to_diff | ( | VALUE | ) |
| static VALUE datetime_s__strptime | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_s_civil | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 7297 of file date_core.c.
| static VALUE datetime_s_commercial | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 7394 of file date_core.c.
| static VALUE datetime_s_httpdate | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_s_iso8601 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_s_jd | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 7153 of file date_core.c.
| static VALUE datetime_s_jisx0301 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_s_now | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 7608 of file date_core.c.
| static VALUE datetime_s_ordinal | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 7221 of file date_core.c.
| static VALUE datetime_s_parse | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
Definition at line 7885 of file date_core.c.
References DEFAULT_SG, INT2FIX, Qtrue, and rb_str_new2.
| static VALUE datetime_s_rfc2822 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_s_rfc3339 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_s_strptime | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_s_xmlschema | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass | |||
| ) | [static] |
| static VALUE datetime_to_date | ( | VALUE | self | ) | [static] |
Definition at line 8583 of file date_core.c.
| static VALUE datetime_to_datetime | ( | VALUE | self | ) | [static] |
| static VALUE datetime_to_time | ( | VALUE | self | ) | [static] |
Definition at line 8556 of file date_core.c.
| static VALUE day_to_sec | ( | VALUE | d | ) | [static] |
Definition at line 998 of file date_core.c.
| static void decode_day | ( | VALUE | d, | |
| VALUE * | jd, | |||
| VALUE * | df, | |||
| VALUE * | sf | |||
| ) | [static] |
Definition at line 1068 of file date_core.c.
| static void decode_jd | ( | VALUE | jd, | |
| VALUE * | nth, | |||
| int * | rjd | |||
| ) | [static] |
| static void decode_year | ( | VALUE | y, | |
| double | style, | |||
| VALUE * | nth, | |||
| int * | ry | |||
| ) | [static] |
Definition at line 1305 of file date_core.c.
References DIV, FIX2LONG, FIXNUM_MAX, LONG2FIX, and MOD.
Referenced by k_rational_p().
| static int df_local_to_utc | ( | int | df, | |
| int | of | |||
| ) | [inline, static] |
Definition at line 872 of file date_core.c.
| static void df_to_time | ( | int | df, | |
| int * | h, | |||
| int * | min, | |||
| int * | s | |||
| ) | [inline, static] |
Definition at line 922 of file date_core.c.
| static int df_utc_to_local | ( | int | df, | |
| int | of | |||
| ) | [inline, static] |
Definition at line 883 of file date_core.c.
| static VALUE div_day | ( | VALUE | d, | |
| VALUE * | f | |||
| ) | [static] |
Definition at line 1038 of file date_core.c.
| static VALUE div_df | ( | VALUE | d, | |
| VALUE * | f | |||
| ) | [static] |
Definition at line 1046 of file date_core.c.
| static VALUE dt_lite_iso8601 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 8330 of file date_core.c.
| static VALUE dt_lite_jisx0301 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
Definition at line 8370 of file date_core.c.
| static VALUE dt_lite_rfc3339 | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
| static VALUE dt_lite_strftime | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | self | |||
| ) | [static] |
| static VALUE dt_lite_to_s | ( | VALUE | self | ) | [static] |
| static VALUE dt_new_by_frags | ( | VALUE | klass, | |
| VALUE | hash, | |||
| VALUE | sg | |||
| ) | [static] |
| static VALUE dup_obj | ( | VALUE | self | ) | [static] |
Definition at line 4615 of file date_core.c.
| static VALUE dup_obj_as_complex | ( | VALUE | self | ) | [static] |
Definition at line 4638 of file date_core.c.
| static VALUE dup_obj_with_new_offset | ( | VALUE | obj, | |
| int | of | |||
| ) | [static] |
| static VALUE dup_obj_with_new_start | ( | VALUE | obj, | |
| double | sg | |||
| ) | [static] |
Definition at line 5337 of file date_core.c.
Referenced by d_lite_england(), d_lite_italy(), and d_lite_julian().
| static void encode_jd | ( | VALUE | nth, | |
| int | jd, | |||
| VALUE * | rjd | |||
| ) | [static] |
Definition at line 1369 of file date_core.c.
| static void encode_year | ( | VALUE | nth, | |
| int | y, | |||
| double | style, | |||
| VALUE * | ry | |||
| ) | [static] |
Definition at line 1337 of file date_core.c.
| static VALUE equal_gen | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
| static VALUE f_cmp | ( | VALUE | x, | |
| VALUE | y | |||
| ) | [inline, static] |
Definition at line 54 of file date_core.c.
Referenced by nurat_cmp(), nurat_expt(), nurat_s_canonicalize_internal(), and nurat_s_canonicalize_internal_no_reduce().
| static VALUE f_eqeq_p | ( | VALUE | x, | |
| VALUE | y | |||
| ) | [inline, static] |
Definition at line 100 of file date_core.c.
Referenced by d_lite_cmp(), d_lite_equal(), nucomp_eqeq_p(), nucomp_eql_p(), nurat_eqeq_p(), nurat_rationalize(), rb_flt_rationalize(), and rb_flt_rationalize_with_prec().
| static VALUE f_ge_p | ( | VALUE | x, | |
| VALUE | y | |||
| ) | [inline, static] |
Definition at line 92 of file date_core.c.
| static VALUE f_gt_p | ( | VALUE | x, | |
| VALUE | y | |||
| ) | [inline, static] |
Definition at line 76 of file date_core.c.
| static VALUE f_kind_of_p | ( | VALUE | x, | |
| VALUE | c | |||
| ) | [inline, static] |
| static VALUE f_le_p | ( | VALUE | x, | |
| VALUE | y | |||
| ) | [inline, static] |
Definition at line 84 of file date_core.c.
| static VALUE f_lt_p | ( | VALUE | x, | |
| VALUE | y | |||
| ) | [inline, static] |
Definition at line 68 of file date_core.c.
| static VALUE f_negative_p | ( | VALUE | x | ) | [inline, static] |
Definition at line 127 of file date_core.c.
Referenced by f_gcd_normal(), f_muldiv(), f_signbit(), float_rationalize(), nurat_rationalize(), nurat_round(), and nurat_truncate().
| static VALUE f_zero_p | ( | VALUE | x | ) | [inline, static] |
Definition at line 108 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, RRATIONAL, and VALUE.
| static void get_c_civil | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1259 of file date_core.c.
| static void get_c_df | ( | union DateData * | x | ) | [inline, static] |
| static void get_c_jd | ( | union DateData * | x | ) | [inline, static] |
| static void get_c_time | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1192 of file date_core.c.
| static void get_s_civil | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1153 of file date_core.c.
| static void get_s_jd | ( | union DateData * | x | ) | [inline, static] |
| static struct tm* gmtime_r | ( | const time_t * | t, | |
| struct tm * | tm | |||
| ) | [static] |
Definition at line 3587 of file date_core.c.
| static double guess_style | ( | VALUE | y, | |
| double | sg | |||
| ) | [inline, static] |
Definition at line 1379 of file date_core.c.
References assert, FIX2LONG, FIXNUM_P, negative_inf, positive_inf, REFORM_BEGIN_YEAR, and REFORM_END_YEAR.
Referenced by k_rational_p().
| static VALUE h_trunc | ( | VALUE | h, | |
| VALUE * | fr | |||
| ) | [inline, static] |
Definition at line 3136 of file date_core.c.
| void Init_date_core | ( | void | ) |
| static VALUE isec_to_day | ( | int | s | ) | [inline, static] |
Definition at line 939 of file date_core.c.
References day_in_nanoseconds, f_quo, FIXNUM_P, and rb_rational_new2.
| static VALUE iso8601_timediv | ( | VALUE | self, | |
| VALUE | n | |||
| ) | [static] |
Definition at line 8296 of file date_core.c.
| static int jd_local_to_utc | ( | int | jd, | |
| int | df, | |||
| int | of | |||
| ) | [inline, static] |
Definition at line 894 of file date_core.c.
| static int jd_utc_to_local | ( | int | jd, | |
| int | df, | |||
| int | of | |||
| ) | [inline, static] |
Definition at line 905 of file date_core.c.
| static VALUE jisx0301_date | ( | VALUE | jd, | |
| VALUE | y | |||
| ) | [static] |
Definition at line 6949 of file date_core.c.
| static VALUE k_date_p | ( | VALUE | x | ) | [inline, static] |
| static VALUE k_numeric_p | ( | VALUE | x | ) | [inline, static] |
| static VALUE k_rational_p | ( | VALUE | x | ) | [inline, static] |
Definition at line 1972 of file date_core.c.
References c_civil_to_jd(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, and VALUE.
| static int local_df | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1297 of file date_core.c.
| static int local_jd | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1288 of file date_core.c.
| static struct tm* localtime_r | ( | const time_t * | t, | |
| struct tm * | tm | |||
| ) | [static] |
Definition at line 3596 of file date_core.c.
| static VALUE m_ajd | ( | union DateData * | x | ) | [static] |
Definition at line 1558 of file date_core.c.
References f_mul, f_sub, FIX2LONG, FIXNUM_MAX, FIXNUM_P, INT2FIX, LONG2FIX, m_real_jd(), and rb_rational_new2.
| static VALUE m_amjd | ( | union DateData * | x | ) | [static] |
| static void m_canonicalize_jd | ( | union DateData * | x | ) | [inline, static] |
| static int m_cwday | ( | union DateData * | x | ) | [static] |
| static int m_cweek | ( | union DateData * | x | ) | [static] |
| static int m_cwyear | ( | union DateData * | x | ) | [static] |
Definition at line 1812 of file date_core.c.
| static int m_df | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1477 of file date_core.c.
| static VALUE m_fr | ( | union DateData * | x | ) | [static] |
Definition at line 1538 of file date_core.c.
| static int m_gregorian_p | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1668 of file date_core.c.
References m_sg().
Referenced by d_lite_cmp(), d_lite_equal(), and d_lite_julian_p().
| static int m_hour | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1883 of file date_core.c.
| static int m_jd | ( | union DateData * | x | ) | [inline, static] |
| static int m_julian_p | ( | union DateData * | x | ) | [static] |
Definition at line 1647 of file date_core.c.
References get_s_jd(), and s_virtual_sg().
Referenced by d_lite_zone().
| static int m_local_df | ( | union DateData * | x | ) | [static] |
Definition at line 1496 of file date_core.c.
| static int m_local_jd | ( | union DateData * | x | ) | [static] |
Definition at line 1450 of file date_core.c.
Referenced by d_lite_equal(), d_lite_saturday_p(), and m_wday().
| static int m_mday | ( | union DateData * | x | ) | [inline, static] |
| static int m_min | ( | union DateData * | x | ) | [inline, static] |
| static int m_mon | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1727 of file date_core.c.
Referenced by d_lite_saturday_p(), d_lite_yday(), and tmx_m_zone().
| static VALUE m_nth | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1413 of file date_core.c.
Referenced by d_lite_cmp(), d_lite_equal(), and d_lite_plus().
| static int m_of | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1619 of file date_core.c.
| static VALUE m_of_in_day | ( | union DateData * | x | ) | [static] |
Definition at line 1630 of file date_core.c.
References DateData::s, SimpleDateData::sg, and simple_dat_p.
Referenced by d_lite_sec_fraction().
| static int m_proleptic_gregorian_p | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1685 of file date_core.c.
| static int m_proleptic_julian_p | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1674 of file date_core.c.
| static VALUE m_real_cwyear | ( | union DateData * | x | ) | [static] |
Definition at line 1822 of file date_core.c.
| static VALUE m_real_jd | ( | union DateData * | x | ) | [static] |
| static VALUE m_real_local_jd | ( | union DateData * | x | ) | [static] |
Definition at line 1464 of file date_core.c.
Referenced by d_lite_amjd(), d_lite_jd(), and d_lite_mjd().
| static VALUE m_real_year | ( | union DateData * | x | ) | [static] |
| static int m_sec | ( | union DateData * | x | ) | [inline, static] |
| static VALUE m_sf | ( | union DateData * | x | ) | [inline, static] |
Definition at line 1515 of file date_core.c.
| static VALUE m_sf_in_sec | ( | union DateData * | x | ) | [static] |
Definition at line 1532 of file date_core.c.
References INT2FIX, and simple_dat_p.
Referenced by d_lite_sec().
| static double m_sg | ( | union DateData * | x | ) | [inline, static] |
| static double m_virtual_sg | ( | union DateData * | x | ) | [inline, static] |
| static int m_wday | ( | union DateData * | x | ) | [static] |
Definition at line 1806 of file date_core.c.
References c_jd_to_commercial(), m_local_jd(), and m_virtual_sg().
Referenced by d_lite_friday_p(), d_lite_monday_p(), d_lite_saturday_p(), d_lite_sunday_p(), d_lite_thursday_p(), d_lite_tuesday_p(), d_lite_wday(), and d_lite_wednesday_p().
| static int m_wnum0 | ( | union DateData * | x | ) | [static] |
| static int m_wnum1 | ( | union DateData * | x | ) | [static] |
| static int m_wnumx | ( | union DateData * | x, | |
| int | f | |||
| ) | [static] |
| static int m_yday | ( | union DateData * | x | ) | [static] |
| static int m_year | ( | union DateData * | x | ) | [inline, static] |
| static VALUE m_zone | ( | union DateData * | x | ) | [static] |
| static VALUE min_trunc | ( | VALUE | min, | |
| VALUE * | fr | |||
| ) | [inline, static] |
Definition at line 3153 of file date_core.c.
| static VALUE minus_dd | ( | VALUE | self, | |
| VALUE | other | |||
| ) | [static] |
Definition at line 5799 of file date_core.c.
| static VALUE mk_ary_of_str | ( | long | len, | |
| const char * | a[] | |||
| ) | [static] |
Definition at line 8944 of file date_core.c.
| static VALUE mk_inspect | ( | union DateData * | x, | |
| const char * | klass, | |||
| const char * | to_s | |||
| ) | [static] |
Definition at line 6472 of file date_core.c.
| static VALUE ns_to_day | ( | VALUE | n | ) | [static] |
Definition at line 945 of file date_core.c.
| static VALUE ns_to_sec | ( | VALUE | n | ) | [static] |
Definition at line 963 of file date_core.c.
| static VALUE of2str | ( | int | of | ) | [static] |
Definition at line 1937 of file date_core.c.
| static int offset_to_sec | ( | VALUE | vof, | |
| int * | rof | |||
| ) | [static] |
Definition at line 2324 of file date_core.c.
| static void old_to_new | ( | VALUE | ajd, | |
| VALUE | of, | |||
| VALUE | sg, | |||
| VALUE * | rnth, | |||
| int * | rjd, | |||
| int * | rdf, | |||
| VALUE * | rsf, | |||
| int * | rof, | |||
| double * | rsg | |||
| ) | [static] |
Definition at line 3007 of file date_core.c.
| static VALUE rt__valid_civil_p | ( | VALUE | y, | |
| VALUE | m, | |||
| VALUE | d, | |||
| VALUE | sg | |||
| ) | [static] |
Definition at line 3964 of file date_core.c.
| static VALUE rt__valid_commercial_p | ( | VALUE | y, | |
| VALUE | w, | |||
| VALUE | d, | |||
| VALUE | sg | |||
| ) | [static] |
Definition at line 3979 of file date_core.c.
| static VALUE rt__valid_date_frags_p | ( | VALUE | hash, | |
| VALUE | sg | |||
| ) | [static] |
| static VALUE rt__valid_jd_p | ( | VALUE | jd, | |
| VALUE | sg | |||
| ) | [static] |
Definition at line 3943 of file date_core.c.
References VALUE.
Referenced by rt__valid_date_frags_p().
| static VALUE rt__valid_ordinal_p | ( | VALUE | y, | |
| VALUE | d, | |||
| VALUE | sg | |||
| ) | [static] |
Definition at line 3949 of file date_core.c.
| static VALUE rt__valid_weeknum_p | ( | VALUE | y, | |
| VALUE | w, | |||
| VALUE | d, | |||
| VALUE | f, | |||
| VALUE | sg | |||
| ) | [static] |
Definition at line 3994 of file date_core.c.
| static VALUE rt_complete_frags | ( | VALUE | klass, | |
| VALUE | hash | |||
| ) | [static] |
Definition at line 3702 of file date_core.c.
References Qnil, rb_ary_new3, rb_gc_register_mark_object(), and sym.
| static VALUE rt_rewrite_frags | ( | VALUE | hash | ) | [static] |
Definition at line 3664 of file date_core.c.
References del_hash, f_add, f_idiv, f_mod, HOUR_IN_SECONDS, INT2FIX, MINUTE_IN_SECONDS, set_hash, UNIX_EPOCH_IN_CJD, and VALUE.
| static VALUE s_trunc | ( | VALUE | s, | |
| VALUE * | fr | |||
| ) | [inline, static] |
Definition at line 3170 of file date_core.c.
| static double s_virtual_sg | ( | union DateData * | x | ) | [inline, static] |
| static int safe_mul_p | ( | VALUE | x, | |
| long | m | |||
| ) | [static] |
Definition at line 979 of file date_core.c.
| static VALUE sec_to_day | ( | VALUE | s | ) | [static] |
Definition at line 931 of file date_core.c.
| static VALUE sec_to_ms | ( | VALUE | s | ) | [static] |
Definition at line 1014 of file date_core.c.
| static VALUE sec_to_ns | ( | VALUE | s | ) | [static] |
Definition at line 1022 of file date_core.c.
| static void set_of | ( | union DateData * | x, | |
| int | of | |||
| ) | [static] |
Definition at line 5420 of file date_core.c.
| static void set_sg | ( | union DateData * | , | |
| double | ||||
| ) | [static] |
Definition at line 5322 of file date_core.c.
| static void set_tmx | ( | VALUE | , | |
| struct tmx * | ||||
| ) | [static] |
Definition at line 6618 of file date_core.c.
Referenced by d_lite_asctime(), d_lite_iso8601(), d_lite_rfc2822(), d_lite_rfc3339(), and dt_lite_to_s().
| static VALUE strftimev | ( | const char * | , | |
| VALUE | , | |||
| void(*)(VALUE, struct tmx *) | ||||
| ) | [static] |
Definition at line 6865 of file date_core.c.
Referenced by d_lite_asctime(), d_lite_iso8601(), d_lite_rfc2822(), d_lite_rfc3339(), time_asctime(), and time_to_s().
| static VALUE time_to_date | ( | VALUE | self | ) | [static] |
Definition at line 8416 of file date_core.c.
| static VALUE time_to_datetime | ( | VALUE | self | ) | [static] |
Definition at line 8446 of file date_core.c.
| static int time_to_df | ( | int | h, | |
| int | min, | |||
| int | s | |||
| ) | [inline, static] |
| static VALUE time_to_time | ( | VALUE | self | ) | [static] |
Definition at line 8404 of file date_core.c.
| static VALUE tmx_m_msecs | ( | union DateData * | x | ) | [static] |
Definition at line 6571 of file date_core.c.
| static int tmx_m_of | ( | union DateData * | x | ) | [static] |
| static VALUE tmx_m_secs | ( | union DateData * | x | ) | [static] |
Definition at line 6553 of file date_core.c.
| static char* tmx_m_zone | ( | union DateData * | x | ) | [static] |
Definition at line 6591 of file date_core.c.
References m_mday(), m_mon(), m_real_year(), m_yday(), and VALUE.
| static VALUE to_integer | ( | VALUE | x | ) | [inline, static] |
| static int valid_civil_p | ( | VALUE | y, | |
| int | m, | |||
| int | d, | |||
| double | sg, | |||
| VALUE * | nth, | |||
| int * | ry, | |||
| int * | rm, | |||
| int * | rd, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 2194 of file date_core.c.
| static VALUE valid_civil_sub | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass, | |||
| int | need_jd | |||
| ) | [static] |
Definition at line 2478 of file date_core.c.
| static int valid_commercial_p | ( | VALUE | y, | |
| int | w, | |||
| int | d, | |||
| double | sg, | |||
| VALUE * | nth, | |||
| int * | ry, | |||
| int * | rw, | |||
| int * | rd, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 2230 of file date_core.c.
| static VALUE valid_commercial_sub | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass, | |||
| int | need_jd | |||
| ) | [static] |
Definition at line 2649 of file date_core.c.
| static int valid_gregorian_p | ( | VALUE | y, | |
| int | m, | |||
| int | d, | |||
| VALUE * | nth, | |||
| int * | ry, | |||
| int * | rm, | |||
| int * | rd | |||
| ) | [static] |
Definition at line 2185 of file date_core.c.
| static VALUE valid_jd_sub | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass, | |||
| int | need_jd | |||
| ) | [static] |
Definition at line 2422 of file date_core.c.
| static int valid_ordinal_p | ( | VALUE | y, | |
| int | d, | |||
| double | sg, | |||
| VALUE * | nth, | |||
| int * | ry, | |||
| int * | rd, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 2155 of file date_core.c.
| static VALUE valid_ordinal_sub | ( | int | argc, | |
| VALUE * | argv, | |||
| VALUE | klass, | |||
| int | need_jd | |||
| ) | [static] |
Definition at line 2569 of file date_core.c.
| static int valid_weeknum_p | ( | VALUE | y, | |
| int | w, | |||
| int | d, | |||
| int | f, | |||
| double | sg, | |||
| VALUE * | nth, | |||
| int * | ry, | |||
| int * | rw, | |||
| int * | rd, | |||
| int * | rjd, | |||
| int * | ns | |||
| ) | [static] |
Definition at line 2260 of file date_core.c.
| static int wholenum_p | ( | VALUE | x | ) | [inline, static] |
const char* abbr_daynames[] [static] |
Initial value:
{
"Sun", "Mon", "Tue", "Wed",
"Thu", "Fri", "Sat"
}
Definition at line 8938 of file date_core.c.
const char* abbr_monthnames[] [static] |
Initial value:
{
NULL,
"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"
}
Definition at line 8926 of file date_core.c.
VALUE cDate [static] |
VALUE cDateTime [static] |
Definition at line 23 of file date_core.c.
VALUE day_in_nanoseconds [static] |
const char* daynames[] [static] |
Initial value:
{
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"
}
Definition at line 8933 of file date_core.c.
VALUE half_days_in_day [static] |
Definition at line 24 of file date_core.c.
Definition at line 22 of file date_core.c.
Definition at line 22 of file date_core.c.
Definition at line 22 of file date_core.c.
Definition at line 22 of file date_core.c.
const char* monthnames[] [static] |
Initial value:
{
NULL,
"January", "February", "March",
"April", "May", "June",
"July", "August", "September",
"October", "November", "December"
}
Definition at line 8918 of file date_core.c.
const int monthtab[2][13] [static] |
Initial value:
{
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
}
Definition at line 671 of file date_core.c.
double negative_inf [static] |
double positive_inf [static] |
Initial value:
{
(VALUE (*)(void *))m_real_year,
(int (*)(void *))m_yday,
(int (*)(void *))m_mon,
(int (*)(void *))m_mday,
(VALUE (*)(void *))m_real_cwyear,
(int (*)(void *))m_cweek,
(int (*)(void *))m_cwday,
(int (*)(void *))m_wnum0,
(int (*)(void *))m_wnum1,
(int (*)(void *))m_wday,
(int (*)(void *))m_hour,
(int (*)(void *))m_min,
(int (*)(void *))m_sec,
(VALUE (*)(void *))m_sf_in_sec,
(VALUE (*)(void *))tmx_m_secs,
(VALUE (*)(void *))tmx_m_msecs,
(int (*)(void *))tmx_m_of,
(char *(*)(void *))tmx_m_zone
}
Definition at line 6596 of file date_core.c.
const int yeartab[2][13] [static] |
Initial value:
{
{ 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 },
{ 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }
}
Definition at line 1768 of file date_core.c.
1.4.7