Ruby
1.9.3p547(2014-05-14revision45962)
|
#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 |
Macros | |
#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 /* 1582-10-15 */ |
#define | ENGLAND 2361222 /* 1752-09-14 */ |
#define | JULIAN positive_inf |
#define | GREGORIAN negative_inf |
#define | DEFAULT_SG ITALY |
#define | UNIX_EPOCH_IN_CJD INT2FIX(2440588) /* 1970-01-01 */ |
#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 /* 365.25 * 4 */ |
#define | GC_PERIOD0 146097 /* 365.2425 * 400 */ |
#define | CM_PERIOD0 71149239 /* (lcm 7 1461 146097) */ |
#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 /* ns 1582-01-01 */ |
#define | REFORM_END_JD 2426355 /* os 1930-12-31 */ |
#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 | 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_pc (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_datetime_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 VALUE | 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 | 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 | ( | ) |
Definition at line 3257 of file date_core.c.
Referenced by date_s_civil(), date_s_commercial(), date_s_jd(), date_s_ordinal(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), and datetime_s_ordinal().
#define canon24oc | ( | ) |
Definition at line 3249 of file date_core.c.
Referenced by datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), and datetime_s_ordinal().
#define canonicalize_jd | ( | _nth, | |
_jd | |||
) |
Definition at line 1118 of file date_core.c.
Referenced by canonicalize_c_jd(), canonicalize_s_jd(), d_lite_plus(), and minus_dd().
#define CM_PERIOD (0xfffffff / CM_PERIOD0 * CM_PERIOD0) |
Definition at line 179 of file date_core.c.
Referenced by d_lite_plus(), decode_jd(), encode_jd(), and minus_dd().
#define CM_PERIOD0 71149239 /* (lcm 7 1461 146097) */ |
Definition at line 178 of file date_core.c.
#define CM_PERIOD_GCY (CM_PERIOD / GC_PERIOD0 * 400) |
Definition at line 181 of file date_core.c.
Referenced by decode_year(), and encode_year().
#define CM_PERIOD_JCY (CM_PERIOD / JC_PERIOD0 * 4) |
Definition at line 180 of file date_core.c.
Referenced by decode_year(), and encode_year().
#define COMPLEX_DAT (1 << 7) |
Definition at line 153 of file date_core.c.
Referenced by d_complex_new_internal(), d_lite_initialize_copy(), d_lite_marshal_load(), d_lite_plus(), d_simple_new_internal(), datetime_to_date(), and dup_obj_as_complex().
#define complex_dat_p | ( | x | ) | ((x)->flags & COMPLEX_DAT) |
Definition at line 159 of file date_core.c.
Referenced by d_lite_initialize_copy(), d_lite_marshal_load(), get_c_civil(), get_c_df(), get_c_jd(), get_c_time(), local_df(), local_jd(), and set_of().
#define copy_complex_to_simple | ( | x, | |
y | |||
) |
Definition at line 424 of file date_core.c.
Referenced by datetime_to_date().
#define copy_simple_to_complex | ( | x, | |
y | |||
) |
Definition at line 398 of file date_core.c.
Referenced by dup_obj_as_complex().
#define DAY_IN_SECONDS 86400 |
Definition at line 172 of file date_core.c.
Referenced by d_lite_plus(), datetime_s_now(), day_to_sec(), df_local_to_utc(), df_utc_to_local(), dt_new_by_frags(), Init_date_core(), jd_local_to_utc(), jd_utc_to_local(), minus_dd(), offset_to_sec(), old_to_new(), rt_rewrite_frags(), and sec_to_day().
#define decode_offset | ( | of, | |
s, | |||
h, | |||
m | |||
) |
Definition at line 1952 of file date_core.c.
Referenced by of2str().
#define DEFAULT_SG ITALY |
Definition at line 166 of file date_core.c.
Referenced by d_lite_new_start(), d_lite_s_alloc_complex(), d_lite_s_alloc_simple(), d_new_by_frags(), date_s_civil(), date_s_commercial(), date_s_httpdate(), date_s_iso8601(), date_s_jd(), date_s_jisx0301(), date_s_ordinal(), date_s_parse(), date_s_rfc2822(), date_s_rfc3339(), date_s_strptime(), date_s_today(), date_s_valid_civil_p(), date_s_valid_commercial_p(), date_s_valid_jd_p(), date_s_valid_ordinal_p(), date_s_xmlschema(), datetime_s_civil(), datetime_s_commercial(), datetime_s_httpdate(), datetime_s_iso8601(), datetime_s_jd(), datetime_s_jisx0301(), datetime_s_now(), datetime_s_ordinal(), datetime_s_parse(), datetime_s_rfc2822(), datetime_s_rfc3339(), datetime_s_strptime(), datetime_s_xmlschema(), dt_new_by_frags(), old_to_new(), time_to_date(), and time_to_datetime().
#define del_hash | ( | k | ) | rb_hash_delete(hash, ID2SYM(rb_intern(k))) |
Definition at line 3714 of file date_core.c.
Referenced by rt_rewrite_frags().
#define del_hash0 | ( | k | ) | rb_hash_delete(hash, k) |
Definition at line 3710 of file date_core.c.
#define DIV | ( | n, | |
d | |||
) | ((n)<0 ? NDIV((n),(d)) : (n)/(d)) |
Definition at line 146 of file date_core.c.
Referenced by c_jd_to_commercial(), c_jd_to_weeknum(), d_lite_plus(), d_lite_rshift(), decode_year(), and vm_init_redefined_flag().
#define ENGLAND 2361222 /* 1752-09-14 */ |
Definition at line 163 of file date_core.c.
Referenced by d_lite_england(), and Init_date_core().
#define EX_HOUR | ( | x | ) | (((x) >> HOUR_SHIFT) & PK_MASK(HOUR_WIDTH)) |
Definition at line 205 of file date_core.c.
Referenced by d_lite_plus(), get_c_civil(), get_c_df(), get_c_jd(), and m_hour().
#define EX_MDAY | ( | x | ) | (((x) >> MDAY_SHIFT) & PK_MASK(MDAY_WIDTH)) |
Definition at line 206 of file date_core.c.
Referenced by date_to_datetime(), get_c_jd(), get_c_time(), get_s_jd(), and m_mday().
Definition at line 204 of file date_core.c.
Referenced by d_lite_plus(), get_c_civil(), get_c_df(), get_c_jd(), and m_min().
Definition at line 207 of file date_core.c.
Referenced by date_to_datetime(), get_c_jd(), get_c_time(), get_s_jd(), and m_mon().
Definition at line 203 of file date_core.c.
Referenced by d_lite_plus(), get_c_civil(), get_c_df(), get_c_jd(), and m_sec().
#define f_abs | ( | x | ) | rb_funcall(x, rb_intern("abs"), 0) |
Definition at line 26 of file date_core.c.
Referenced by f_divide(), f_format(), f_lcm(), float_rationalize(), nucomp_abs(), nucomp_expt(), nucomp_polar(), numeric_polar(), and nurat_rationalize().
#define f_add | ( | x, | |
y | |||
) | rb_funcall(x, '+', 1, y) |
Definition at line 28 of file date_core.c.
Referenced by d_lite_plus(), datetime_to_time(), decode_year(), dt_lite_iso8601(), encode_jd(), encode_year(), m_ajd(), m_amjd(), m_fr(), minus_dd(), old_to_new(), rt_complete_frags(), rt_rewrite_frags(), tmx_m_msecs(), and tmx_m_secs().
Definition at line 47 of file date_core.c.
Referenced by d_lite_rshift().
#define f_ajd | ( | x | ) | rb_funcall(x, rb_intern("ajd"), 0) |
Definition at line 133 of file date_core.c.
Referenced by cmp_gen().
Definition at line 24 of file date_core.c.
Referenced by d_lite_friday_p(), d_lite_gregorian_p(), d_lite_julian_p(), d_lite_leap_p(), d_lite_monday_p(), d_lite_saturday_p(), d_lite_sunday_p(), d_lite_thursday_p(), d_lite_tuesday_p(), d_lite_wednesday_p(), date_s_gregorian_leap_p(), date_s_julian_leap_p(), f_eqeq_p(), f_ge_p(), f_gt_p(), f_le_p(), f_lt_p(), f_negative_p(), and f_zero_p().
#define f_ceil | ( | x | ) | rb_funcall(x, rb_intern("ceil"), 0) |
Definition at line 38 of file date_core.c.
#define f_div | ( | x, | |
y | |||
) | rb_funcall(x, '/', 1, y) |
Definition at line 31 of file date_core.c.
Referenced by tmx_m_msecs().
#define f_expt | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern("**"), 1, y) |
Definition at line 36 of file date_core.c.
Referenced by float_rationalize(), float_to_r(), iso8601_timediv(), nucomp_expt(), and nurat_expt().
#define f_floor | ( | x | ) | rb_funcall(x, rb_intern("floor"), 0) |
Definition at line 37 of file date_core.c.
Referenced by d_lite_plus(), div_day(), and div_df().
#define f_getlocal | ( | x | ) | rb_funcall(x, rb_intern("getlocal"), 0) |
Definition at line 8648 of file date_core.c.
Referenced by datetime_to_time().
#define f_hour | ( | x | ) | rb_funcall(x, rb_intern("hour"), 0) |
Definition at line 139 of file date_core.c.
Referenced by time_to_datetime().
#define f_idiv | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern("div"), 1, y) |
Definition at line 33 of file date_core.c.
Referenced by d_lite_plus(), d_lite_rshift(), d_trunc(), decode_jd(), decode_year(), f_addsub(), f_muldiv(), h_trunc(), min_trunc(), nurat_ceil(), nurat_floor(), nurat_round(), nurat_s_canonicalize_internal(), nurat_truncate(), rt_rewrite_frags(), and s_trunc().
#define f_inspect | ( | x | ) | rb_funcall(x, rb_intern("inspect"), 0) |
Definition at line 45 of file date_core.c.
Referenced by mk_inspect(), 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 134 of file date_core.c.
Referenced by equal_gen().
#define f_local3 | ( | x, | |
y, | |||
m, | |||
d | |||
) | rb_funcall(x, rb_intern("local"), 3, y, m, d) |
Definition at line 8651 of file date_core.c.
Referenced by date_to_time().
#define f_mday | ( | x | ) | rb_funcall(x, rb_intern("mday"), 0) |
Definition at line 137 of file date_core.c.
Referenced by time_to_date(), and time_to_datetime().
#define f_min | ( | x | ) | rb_funcall(x, rb_intern("min"), 0) |
Definition at line 140 of file date_core.c.
Referenced by time_to_datetime().
#define f_mod | ( | x, | |
y | |||
) | rb_funcall(x, '%', 1, y) |
Definition at line 34 of file date_core.c.
Referenced by d_lite_plus(), d_lite_rshift(), d_trunc(), decode_jd(), decode_year(), div_day(), div_df(), f_gcd(), h_trunc(), min_trunc(), rt__valid_date_frags_p(), rt_rewrite_frags(), and s_trunc().
#define f_mon | ( | x | ) | rb_funcall(x, rb_intern("mon"), 0) |
Definition at line 136 of file date_core.c.
Referenced by time_to_date(), and time_to_datetime().
#define f_mul | ( | x, | |
y | |||
) | rb_funcall(x, '*', 1, y) |
Definition at line 30 of file date_core.c.
Referenced by d_lite_next_year(), d_lite_plus(), d_lite_prev_year(), d_lite_rshift(), day_to_sec(), encode_jd(), encode_year(), f_addsub(), f_complex_polar(), f_divide(), f_lcm(), f_muldiv(), f_round_common(), float_rationalize(), float_to_r(), imp1(), Init_date_core(), m_ajd(), m_sin(), minus_dd(), nucomp_abs2(), nucomp_expt(), nucomp_mul(), nucomp_numerator(), nucomp_s_convert(), numeric_abs2(), nurat_cmp(), nurat_div(), nurat_mul(), nurat_rationalize_internal(), nurat_round(), sec_to_ms(), sec_to_ns(), and string_to_r_internal().
#define f_negate | ( | x | ) | rb_funcall(x, rb_intern("-@"), 0) |
Definition at line 27 of file date_core.c.
Referenced by d_lite_lshift(), d_lite_minus(), d_lite_plus(), f_divide(), f_gcd(), 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 string_to_r_internal().
#define f_nonzero_p | ( | x | ) | (!f_zero_p(x)) |
Definition at line 121 of file date_core.c.
Referenced by decode_year(), m_ajd(), m_amjd(), m_fr(), minus_dd(), and tmx_m_msecs().
#define f_positive_p | ( | x | ) | (!f_negative_p(x)) |
Definition at line 131 of file date_core.c.
Referenced by d_lite_plus(), and guess_style().
#define f_public | ( | m, | |
s | |||
) |
Referenced by Init_date_core().
#define f_quo | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern("quo"), 1, y) |
Definition at line 32 of file date_core.c.
Referenced by f_reciprocal(), h_trunc(), iso8601_timediv(), min_trunc(), ns_to_day(), ns_to_sec(), nucomp_div(), s_trunc(), and sec_to_day().
#define f_remainder | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern("remainder"), 1, y) |
Definition at line 35 of file date_core.c.
#define f_round | ( | x | ) | rb_funcall(x, rb_intern("round"), 0) |
Definition at line 40 of file date_core.c.
Referenced by iso8601_timediv(), offset_to_sec(), and old_to_new().
#define f_sec | ( | x | ) | rb_funcall(x, rb_intern("sec"), 0) |
Definition at line 141 of file date_core.c.
Referenced by time_to_datetime().
#define f_sub | ( | x, | |
y | |||
) | rb_funcall(x, '-', 1, y) |
Definition at line 29 of file date_core.c.
Referenced by d_lite_ld(), d_lite_mjd(), d_lite_plus(), d_lite_rshift(), jisx0301_date(), m_ajd(), m_amjd(), minus_dd(), rt__valid_date_frags_p(), rt_complete_frags(), and tmx_m_secs().
Definition at line 48 of file date_core.c.
#define f_subsec | ( | x | ) | rb_funcall(x, rb_intern("subsec"), 0) |
Definition at line 8649 of file date_core.c.
Referenced by time_to_datetime().
#define f_to_i | ( | x | ) | rb_funcall(x, rb_intern("to_i"), 0) |
Definition at line 42 of file date_core.c.
Referenced by f_round_common(), nucomp_to_i(), nurat_int_value(), string_to_c_internal(), string_to_r_internal(), and to_integer().
#define f_to_r | ( | x | ) | rb_funcall(x, rb_intern("to_r"), 0) |
Definition at line 43 of file date_core.c.
Referenced by d_lite_plus(), nucomp_to_r(), offset_to_sec(), and string_to_c_internal().
#define f_to_s | ( | x | ) | rb_funcall(x, rb_intern("to_s"), 0) |
Definition at line 44 of file date_core.c.
Referenced by d_lite_inspect(), 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 39 of file date_core.c.
#define f_utc6 | ( | x, | |
y, | |||
m, | |||
d, | |||
h, | |||
min, | |||
s | |||
) |
Definition at line 8652 of file date_core.c.
Referenced by datetime_to_time().
#define f_utc_offset | ( | x | ) | rb_funcall(x, rb_intern("utc_offset"), 0) |
Definition at line 8650 of file date_core.c.
Referenced by time_to_datetime().
#define f_wday | ( | x | ) | rb_funcall(x, rb_intern("wday"), 0) |
Definition at line 138 of file date_core.c.
#define f_year | ( | x | ) | rb_funcall(x, rb_intern("year"), 0) |
Definition at line 135 of file date_core.c.
Referenced by time_to_date(), and time_to_datetime().
#define GC_PERIOD0 146097 /* 365.2425 * 400 */ |
Definition at line 177 of file date_core.c.
#define get_d1 | ( | x | ) |
Definition at line 295 of file date_core.c.
Referenced by cmp_gen(), d_lite_ajd(), d_lite_amjd(), d_lite_cwday(), d_lite_cweek(), d_lite_cwyear(), d_lite_day_fraction(), d_lite_friday_p(), d_lite_gregorian_p(), d_lite_hash(), d_lite_hour(), d_lite_inspect(), d_lite_jd(), d_lite_jisx0301(), d_lite_julian_p(), d_lite_ld(), d_lite_leap_p(), d_lite_marshal_dump(), d_lite_marshal_load(), d_lite_mday(), d_lite_min(), d_lite_mjd(), d_lite_mon(), d_lite_monday_p(), d_lite_offset(), d_lite_plus(), d_lite_rshift(), d_lite_saturday_p(), d_lite_sec(), d_lite_sec_fraction(), d_lite_start(), 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(), d_lite_zone(), date_s_today(), date_to_time(), datetime_s_now(), datetime_to_time(), dt_lite_jisx0301(), dup_obj_with_new_offset(), dup_obj_with_new_start(), equal_gen(), iso8601_timediv(), set_tmx(), time_to_date(), and time_to_datetime().
#define get_d1a | ( | x | ) |
Definition at line 299 of file date_core.c.
Referenced by date_to_datetime(), datetime_to_date(), dup_obj(), and dup_obj_as_complex().
#define get_d1b | ( | x | ) |
Definition at line 303 of file date_core.c.
Referenced by date_to_datetime(), datetime_to_date(), dup_obj(), and dup_obj_as_complex().
#define get_d2 | ( | x, | |
y | |||
) |
Definition at line 307 of file date_core.c.
Referenced by cmp_dd(), d_lite_cmp(), d_lite_equal(), d_lite_initialize_copy(), and minus_dd().
#define GREGORIAN negative_inf |
Definition at line 165 of file date_core.c.
Referenced by d_lite_gregorian(), date_s_today(), datetime_s_now(), Init_date_core(), and time_to_date().
#define HALF_DAYS_IN_SECONDS (DAY_IN_SECONDS / 2) |
Definition at line 1563 of file date_core.c.
Referenced by m_ajd().
#define HAVE_CIVIL (1 << 2) |
Definition at line 151 of file date_core.c.
Referenced by canonicalize_c_jd(), canonicalize_s_jd(), clear_civil(), d_lite_plus(), date_s_civil(), date_s_today(), datetime_s_civil(), datetime_s_now(), get_c_civil(), get_s_civil(), time_to_date(), and time_to_datetime().
#define have_civil_p | ( | x | ) | ((x)->flags & HAVE_CIVIL) |
Definition at line 157 of file date_core.c.
Referenced by d_complex_new_internal(), d_simple_new_internal(), get_c_civil(), get_c_jd(), get_s_civil(), and get_s_jd().
#define HAVE_DF (1 << 1) |
Definition at line 150 of file date_core.c.
Referenced by d_lite_marshal_load(), d_lite_plus(), d_lite_s_alloc_complex(), date_to_datetime(), datetime_to_date(), dt_new_by_frags(), dup_obj_as_complex(), and get_c_df().
#define have_df_p | ( | x | ) | ((x)->flags & HAVE_DF) |
Definition at line 156 of file date_core.c.
Referenced by d_complex_new_internal(), get_c_df(), get_c_time(), local_df(), and local_jd().
#define HAVE_JD (1 << 0) |
Definition at line 149 of file date_core.c.
Referenced by d_lite_marshal_load(), d_lite_plus(), d_lite_s_alloc_complex(), d_lite_s_alloc_simple(), d_new_by_frags(), date_s_civil(), date_s_commercial(), date_s_jd(), date_s_ordinal(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_ordinal(), dt_new_by_frags(), get_c_jd(), and get_s_jd().
#define have_jd_p | ( | x | ) | ((x)->flags & HAVE_JD) |
Definition at line 155 of file date_core.c.
Referenced by canonicalize_c_jd(), canonicalize_s_jd(), d_complex_new_internal(), d_lite_cmp(), d_lite_equal(), d_simple_new_internal(), get_c_civil(), get_c_jd(), get_s_civil(), get_s_jd(), and local_jd().
#define HAVE_TIME (1 << 3) |
Definition at line 152 of file date_core.c.
Referenced by clear_civil(), d_lite_plus(), date_to_datetime(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_now(), datetime_s_ordinal(), datetime_to_date(), get_c_time(), and time_to_datetime().
#define have_time_p | ( | x | ) | ((x)->flags & HAVE_TIME) |
Definition at line 158 of file date_core.c.
Referenced by d_complex_new_internal(), get_c_df(), and get_c_time().
#define HOUR_IN_SECONDS 3600 |
Definition at line 171 of file date_core.c.
Referenced by df_to_time(), rt_rewrite_frags(), and time_to_df().
Definition at line 197 of file date_core.c.
#define HOUR_WIDTH 5 |
Definition at line 191 of file date_core.c.
#define ITALY 2299161 /* 1582-10-15 */ |
Definition at line 162 of file date_core.c.
Referenced by d_lite_italy(), and Init_date_core().
#define JC_PERIOD0 1461 /* 365.25 * 4 */ |
Definition at line 176 of file date_core.c.
#define jd_trunc d_trunc |
Definition at line 3175 of file date_core.c.
#define JULIAN positive_inf |
Definition at line 164 of file date_core.c.
Referenced by d_lite_julian(), and Init_date_core().
#define k_trunc d_trunc |
Definition at line 3176 of file date_core.c.
#define MDAY_SHIFT (HOUR_WIDTH + MIN_WIDTH + SEC_WIDTH) |
Definition at line 198 of file date_core.c.
Referenced by d_lite_equal().
#define MDAY_WIDTH 5 |
Definition at line 192 of file date_core.c.
#define MILLISECOND_IN_NANOSECONDS 1000000 |
Definition at line 6816 of file date_core.c.
Referenced by tmx_m_msecs().
#define MIN_SHIFT SEC_WIDTH |
Definition at line 196 of file date_core.c.
#define MIN_WIDTH 6 |
Definition at line 190 of file date_core.c.
#define MINUTE_IN_SECONDS 60 |
Definition at line 170 of file date_core.c.
Referenced by df_to_time(), rt_rewrite_frags(), and time_to_df().
#define MOD | ( | n, | |
d | |||
) | ((n)<0 ? NMOD((n),(d)) : (n)%(d)) |
Definition at line 147 of file date_core.c.
Referenced by c_commercial_to_jd(), c_gregorian_leap_p(), c_jd_to_commercial(), c_jd_to_wday(), c_jd_to_weeknum(), c_julian_leap_p(), c_weeknum_to_jd(), d_lite_plus(), d_lite_rshift(), decode_year(), and vm_init_redefined_flag().
#define MON_SHIFT (MDAY_WIDTH + HOUR_WIDTH + MIN_WIDTH + SEC_WIDTH) |
Definition at line 199 of file date_core.c.
#define MON_WIDTH 4 |
Definition at line 193 of file date_core.c.
#define NDEBUG |
Definition at line 10 of file date_core.c.
#define NDIV | ( | x, | |
y | |||
) | (-(-((x)+1)/(y))-1) |
Definition at line 144 of file date_core.c.
#define NMOD | ( | x, | |
y | |||
) | ((y)-(-((x)+1)%(y))-1) |
Definition at line 145 of file date_core.c.
#define num2int_with_frac | ( | s, | |
n | |||
) |
Definition at line 3239 of file date_core.c.
Referenced by date_s_civil(), date_s_commercial(), date_s_ordinal(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), and datetime_s_ordinal().
#define num2num_with_frac | ( | s, | |
n | |||
) |
Definition at line 3229 of file date_core.c.
Referenced by date_s_jd(), and datetime_s_jd().
#define PACK2 | ( | m, | |
d | |||
) | (((m) << MON_SHIFT) | ((d) << MDAY_SHIFT)) |
Definition at line 213 of file date_core.c.
Referenced by get_s_civil().
#define PACK5 | ( | m, | |
d, | |||
h, | |||
min, | |||
s | |||
) |
Definition at line 209 of file date_core.c.
Referenced by date_to_datetime(), get_c_civil(), and get_c_time().
#define PK_MASK | ( | x | ) | ((1 << (x)) - 1) |
Definition at line 201 of file date_core.c.
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by cmp_gen(), equal_gen(), f_eqeq_p(), f_ge_p(), Init_date_core(), and time_to_time().
#define ref_hash | ( | k | ) | rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
Definition at line 3713 of file date_core.c.
Referenced by d_new_by_frags(), date_s__parse_internal(), date_s__strptime_internal(), dt_new_by_frags(), rt__valid_date_frags_p(), rt_complete_frags(), and rt_rewrite_frags().
#define ref_hash0 | ( | k | ) | rb_hash_aref(hash, k) |
Definition at line 3709 of file date_core.c.
Referenced by rt_complete_frags().
#define REFORM_BEGIN_JD 2298874 /* ns 1582-01-01 */ |
Definition at line 185 of file date_core.c.
#define REFORM_BEGIN_YEAR 1582 |
Definition at line 183 of file date_core.c.
Referenced by guess_style().
#define REFORM_END_JD 2426355 /* os 1930-12-31 */ |
Definition at line 186 of file date_core.c.
Referenced by c_valid_start_p().
#define REFORM_END_YEAR 1930 |
Definition at line 184 of file date_core.c.
Referenced by guess_style().
#define SEC_SHIFT 0 |
Definition at line 195 of file date_core.c.
#define SEC_WIDTH 6 |
Definition at line 189 of file date_core.c.
#define SECOND_IN_MILLISECONDS 1000 |
Definition at line 173 of file date_core.c.
Referenced by sec_to_ms().
#define SECOND_IN_NANOSECONDS 1000000000 |
Definition at line 174 of file date_core.c.
Referenced by d_lite_plus(), Init_date_core(), minus_dd(), ns_to_sec(), old_to_new(), and sec_to_ns().
Definition at line 3712 of file date_core.c.
Referenced by date_s__parse_internal(), date_s__strptime_internal(), dt_new_by_frags(), rt_complete_frags(), and rt_rewrite_frags().
#define set_hash0 | ( | k, | |
v | |||
) | rb_hash_aset(hash, k, v) |
Definition at line 3708 of file date_core.c.
Referenced by rt_complete_frags().
#define set_to_complex | ( | x, | |
_nth, | |||
_jd, | |||
_df, | |||
_sf, | |||
_of, | |||
_sg, | |||
_year, | |||
_mon, | |||
_mday, | |||
_hour, | |||
_min, | |||
_sec, | |||
_flags | |||
) |
Definition at line 365 of file date_core.c.
Referenced by d_complex_new_internal(), and d_lite_marshal_load().
#define set_to_simple | ( | x, | |
_nth, | |||
_jd, | |||
_sg, | |||
_year, | |||
_mon, | |||
_mday, | |||
_flags | |||
) |
Definition at line 335 of file date_core.c.
Referenced by d_lite_marshal_load(), and d_simple_new_internal().
#define simple_dat_p | ( | x | ) | (!complex_dat_p(x)) |
Definition at line 160 of file date_core.c.
Referenced by clear_civil(), d_lite_cmp(), d_lite_day_fraction(), d_lite_gc_mark(), d_lite_initialize_copy(), d_lite_plus(), date_to_datetime(), datetime_to_date(), dup_obj(), dup_obj_as_complex(), get_s_civil(), get_s_jd(), m_ajd(), m_amjd(), m_canonicalize_jd(), m_df(), m_fr(), m_hour(), m_jd(), m_julian_p(), m_local_df(), m_local_jd(), m_mday(), m_min(), m_mon(), m_nth(), m_of(), m_pc(), m_sec(), m_sf(), m_sg(), m_virtual_sg(), m_year(), m_zone(), set_sg(), tmx_m_msecs(), and tmx_m_secs().
#define SMALLBUF 100 |
Definition at line 6764 of file date_core.c.
Referenced by date_strftime_alloc(), date_strftime_internal(), and strftimev().
Definition at line 3748 of file date_core.c.
Referenced by cbsubst_sym_to_subst(), iseq_build_from_ary_body(), list_i(), mnew(), rb_call_inits(), rb_dlcfunc_set_calltype(), rb_dlptr_initialize(), rb_dlptr_s_malloc(), recursive_list_access(), register_label(), rt_complete_frags(), sym_to_proc(), sym_to_sym(), vm_call_method(), and w_symbol().
#define UNIX_EPOCH_IN_CJD INT2FIX(2440588) /* 1970-01-01 */ |
Definition at line 168 of file date_core.c.
Referenced by rt_rewrite_frags(), and tmx_m_secs().
#define USE_PACK |
Definition at line 17 of file date_core.c.
Referenced by d_lite_plus().
#define val2off | ( | vof, | |
iof | |||
) |
Definition at line 4732 of file date_core.c.
Referenced by d_lite_new_offset(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), and datetime_s_ordinal().
#define val2sg | ( | vsg, | |
dsg | |||
) |
Definition at line 3263 of file date_core.c.
Referenced by d_lite_new_start(), date_s_civil(), date_s_commercial(), date_s_jd(), date_s_ordinal(), date_s_today(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), and datetime_s_ordinal().
#define valid_sg | ( | sg | ) |
Definition at line 2444 of file date_core.c.
Referenced by valid_civil_sub(), valid_commercial_sub(), valid_jd_sub(), and valid_ordinal_sub().
|
static |
Definition at line 487 of file date_core.c.
References ComplexDateData::jd.
Referenced by c_valid_civil_p(), d_lite_leap_p(), get_c_jd(), get_s_jd(), and valid_civil_p().
|
static |
Definition at line 561 of file date_core.c.
References c_find_fdoy(), MOD, and ComplexDateData::sg.
Referenced by c_jd_to_commercial(), and c_valid_commercial_p().
|
static |
Definition at line 441 of file date_core.c.
References c_valid_civil_p().
Referenced by c_commercial_to_jd(), c_jd_to_ordinal(), c_jd_to_weeknum(), c_ordinal_to_jd(), and c_weeknum_to_jd().
|
static |
Definition at line 476 of file date_core.c.
References c_valid_civil_p(), and i.
Referenced by c_valid_civil_p().
|
static |
Definition at line 452 of file date_core.c.
References c_valid_civil_p(), and i.
Referenced by c_valid_ordinal_p().
|
static |
Definition at line 704 of file date_core.c.
References assert, and c_gregorian_leap_p().
Referenced by c_valid_gregorian_p().
|
inlinestatic |
Definition at line 691 of file date_core.c.
References MOD.
Referenced by c_gregorian_last_day_of_month(), c_gregorian_to_yday(), d_lite_leap_p(), and date_s_gregorian_leap_p().
|
static |
Definition at line 1806 of file date_core.c.
References assert, and c_gregorian_leap_p().
Referenced by m_yday().
|
static |
Definition at line 511 of file date_core.c.
References ComplexDateData::jd.
Referenced by c_jd_to_commercial(), c_jd_to_ordinal(), c_jd_to_weeknum(), c_valid_civil_p(), d_lite_leap_p(), get_c_civil(), and get_s_civil().
|
static |
Definition at line 575 of file date_core.c.
References c_commercial_to_jd(), c_jd_to_civil(), DIV, and MOD.
Referenced by c_valid_commercial_p(), m_cweek(), and m_cwyear().
|
static |
Definition at line 551 of file date_core.c.
References c_find_fdoy(), and c_jd_to_civil().
Referenced by c_valid_ordinal_p(), and m_yday().
|
inlinestatic |
|
static |
Definition at line 606 of file date_core.c.
References c_find_fdoy(), c_jd_to_civil(), DIV, and MOD.
Referenced by c_valid_weeknum_p(), and m_wnumx().
|
static |
Definition at line 697 of file date_core.c.
References assert, and c_julian_leap_p().
Referenced by c_valid_julian_p().
|
inlinestatic |
Definition at line 685 of file date_core.c.
References MOD.
Referenced by c_julian_last_day_of_month(), c_julian_to_yday(), and date_s_julian_leap_p().
|
static |
Definition at line 1799 of file date_core.c.
References assert, and c_julian_leap_p().
Referenced by m_yday().
|
static |
Definition at line 541 of file date_core.c.
References c_find_fdoy(), and ComplexDateData::sg.
Referenced by c_valid_ordinal_p().
|
static |
Definition at line 749 of file date_core.c.
References c_civil_to_jd(), c_find_ldom(), and c_jd_to_civil().
Referenced by c_find_fdoy(), c_find_ldom(), c_find_ldoy(), and valid_civil_p().
|
static |
Definition at line 772 of file date_core.c.
References c_commercial_to_jd(), and c_jd_to_commercial().
Referenced by valid_commercial_p().
|
static |
Definition at line 730 of file date_core.c.
References c_gregorian_last_day_of_month(), and last.
Referenced by valid_civil_p(), and valid_gregorian_p().
|
static |
Definition at line 711 of file date_core.c.
References c_julian_last_day_of_month(), and last.
Referenced by valid_civil_p().
|
static |
Definition at line 657 of file date_core.c.
References c_find_ldoy(), c_jd_to_ordinal(), and c_ordinal_to_jd().
Referenced by valid_ordinal_p().
|
inlinestatic |
Definition at line 868 of file date_core.c.
References isinf(), isnan, and REFORM_END_JD.
Referenced by d_new_by_frags(), dt_new_by_frags(), and old_to_new().
|
static |
Definition at line 850 of file date_core.c.
References min().
Referenced by datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_ordinal(), and dt_new_by_frags().
|
static |
Definition at line 796 of file date_core.c.
References c_jd_to_weeknum(), and c_weeknum_to_jd().
Referenced by valid_weeknum_p().
|
inlinestatic |
Definition at line 1098 of file date_core.c.
References DateData::c, f_negative_p(), f_zero_p(), isinf(), negative_inf, ComplexDateData::nth, positive_inf, and ComplexDateData::sg.
Referenced by get_c_civil(), get_c_jd(), m_julian_p(), and m_virtual_sg().
|
static |
Definition at line 595 of file date_core.c.
References c_find_fdoy(), MOD, and ComplexDateData::sg.
Referenced by c_valid_weeknum_p().
Definition at line 313 of file date_core.c.
References FIX2LONG, FIXNUM_P, RRATIONAL, T_RATIONAL, and TYPE.
|
inlinestatic |
Definition at line 1225 of file date_core.c.
References assert, DateData::c, canonicalize_jd, DateData::flags, HAVE_CIVIL, have_jd_p, ComplexDateData::jd, and ComplexDateData::nth.
Referenced by m_canonicalize_jd().
|
inlinestatic |
Definition at line 1131 of file date_core.c.
References assert, canonicalize_jd, DateData::flags, HAVE_CIVIL, have_jd_p, SimpleDateData::jd, SimpleDateData::nth, and DateData::s.
Referenced by m_canonicalize_jd().
|
static |
Definition at line 5407 of file date_core.c.
References DateData::c, SimpleDateData::flags, ComplexDateData::flags, HAVE_CIVIL, HAVE_TIME, SimpleDateData::pc, ComplexDateData::pc, DateData::s, simple_dat_p, SimpleDateData::year, and ComplexDateData::year.
Definition at line 6306 of file date_core.c.
References f_eqeq_p(), f_lt_p(), get_d2, INT2FIX, m_canonicalize_jd(), m_df(), m_jd(), m_nth(), and m_sf().
Referenced by d_lite_cmp().
Definition at line 6294 of file date_core.c.
References f_ajd, f_cmp(), get_d1, k_date_p(), k_numeric_p(), m_ajd(), rb_intern, and rb_num_coerce_cmp().
Referenced by d_lite_cmp().
|
inlinestatic |
Definition at line 2999 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, and set_to_complex.
Referenced by d_lite_plus(), d_lite_s_alloc_complex(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_now(), datetime_s_ordinal(), dt_new_by_frags(), and time_to_datetime().
Definition at line 4854 of file date_core.c.
References get_d1, and m_ajd().
Referenced by Init_date_core().
Definition at line 4873 of file date_core.c.
References get_d1, and m_amjd().
Referenced by Init_date_core().
Definition at line 7140 of file date_core.c.
References set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 6381 of file date_core.c.
References cmp_dd(), cmp_gen(), f_eqeq_p(), f_lt_p(), get_d2, have_jd_p, INT2FIX, k_date_p(), m_canonicalize_jd(), m_gregorian_p(), m_jd(), m_mday(), m_mon(), m_nth(), m_pc(), m_year(), and simple_dat_p.
Referenced by d_lite_downto(), d_lite_eql_p(), d_lite_step(), d_lite_upto(), and Init_date_core().
Definition at line 5071 of file date_core.c.
References get_d1, INT2FIX, and m_cwday().
Referenced by Init_date_core().
Definition at line 5054 of file date_core.c.
References get_d1, INT2FIX, and m_cweek().
Referenced by Init_date_core().
Definition at line 5037 of file date_core.c.
References get_d1, and m_real_cwyear().
Referenced by Init_date_core().
Definition at line 5017 of file date_core.c.
References get_d1, INT2FIX, m_fr(), and simple_dat_p.
Referenced by Init_date_core().
Definition at line 6279 of file date_core.c.
References d_lite_cmp(), d_lite_plus(), FIX2INT, INT2FIX, rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_date_core().
Definition at line 5505 of file date_core.c.
References dup_obj_with_new_start(), and ENGLAND.
Referenced by Init_date_core().
Definition at line 6600 of file date_core.c.
References d_lite_cmp(), f_zero_p(), k_date_p(), and Qfalse.
Referenced by Init_date_core().
Definition at line 6527 of file date_core.c.
References equal_gen(), f_eqeq_p(), get_d2, have_jd_p, k_date_p(), m_canonicalize_jd(), m_gregorian_p(), m_local_jd(), m_mday(), m_mon(), m_nth(), m_pc(), m_year(), MDAY_SHIFT, Qfalse, and Qtrue.
Referenced by Init_date_core().
Definition at line 5182 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
|
static |
Definition at line 2968 of file date_core.c.
References DateData::c, SimpleDateData::nth, ComplexDateData::nth, rb_gc_mark(), DateData::s, ComplexDateData::sf, and simple_dat_p.
Referenced by d_complex_new_internal(), and d_simple_new_internal().
Definition at line 5529 of file date_core.c.
References dup_obj_with_new_start(), and GREGORIAN.
Referenced by Init_date_core().
Definition at line 5356 of file date_core.c.
References f_boolcast, get_d1, and m_gregorian_p().
Referenced by Init_date_core().
Definition at line 6609 of file date_core.c.
References get_d1, LONG2FIX, m_df(), m_jd(), m_nth(), m_sf(), rb_memhash(), and v.
Referenced by Init_date_core().
Definition at line 5232 of file date_core.c.
References get_d1, INT2FIX, and m_hour().
Referenced by Init_date_core().
Definition at line 7191 of file date_core.c.
References dup_obj_with_new_offset(), set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 4799 of file date_core.c.
References COMPLEX_DAT, complex_dat_p, get_d2, rb_eArgError, rb_raise(), and simple_dat_p.
Referenced by Init_date_core().
Definition at line 6747 of file date_core.c.
References f_to_s, get_d1, mk_inspect(), RB_GC_GUARD, rb_obj_classname(), and RSTRING_PTR.
Referenced by Init_date_core().
Definition at line 7153 of file date_core.c.
References set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 5493 of file date_core.c.
References dup_obj_with_new_start(), and ITALY.
Referenced by Init_date_core().
Definition at line 4892 of file date_core.c.
References get_d1, and m_real_local_jd().
Referenced by Init_date_core(), and rt_complete_frags().
Definition at line 7234 of file date_core.c.
References tmx::dat, get_d1, jisx0301_date(), m_real_local_jd(), m_real_year(), RSTRING_PTR, set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 5517 of file date_core.c.
References dup_obj_with_new_start(), and JULIAN.
Referenced by Init_date_core().
Definition at line 5338 of file date_core.c.
References f_boolcast, get_d1, and m_julian_p().
Referenced by Init_date_core().
Definition at line 4929 of file date_core.c.
References f_sub, get_d1, INT2FIX, and m_real_local_jd().
Referenced by Init_date_core().
Definition at line 5374 of file date_core.c.
References c_civil_to_jd(), c_gregorian_leap_p(), c_jd_to_civil(), f_boolcast, get_d1, m_gregorian_p(), m_virtual_sg(), and m_year().
Referenced by Init_date_core().
Definition at line 6120 of file date_core.c.
References d_lite_rshift(), and f_negate.
Referenced by d_lite_prev_month(), d_lite_prev_year(), and Init_date_core().
Definition at line 7268 of file date_core.c.
References tmx::dat, DBL2NUM, FL_EXIVAR, FL_SET, FL_TEST, get_d1, INT2FIX, m_df(), m_jd(), m_nth(), m_of(), m_sf(), m_sg(), rb_ary_new3(), and rb_copy_generic_ivar().
Referenced by Init_date_core().
Definition at line 7292 of file date_core.c.
References COMPLEX_DAT, complex_dat_p, tmx::dat, f_zero_p(), FL_EXIVAR, FL_SET, FL_TEST, get_d1, HAVE_DF, HAVE_JD, NUM2DBL, NUM2INT, old_to_new(), RARRAY_LEN, RARRAY_PTR, rb_copy_generic_ivar(), rb_eArgError, rb_eTypeError, rb_raise(), set_to_complex, set_to_simple, T_ARRAY, and TYPE.
Referenced by Init_date_core().
Definition at line 5000 of file date_core.c.
References get_d1, INT2FIX, and m_mday().
Referenced by Init_date_core().
Definition at line 5250 of file date_core.c.
References get_d1, INT2FIX, and m_min().
Referenced by Init_date_core().
Definition at line 5988 of file date_core.c.
References d_lite_plus(), DBL2NUM, f_negate, FIX2LONG, k_date_p(), k_numeric_p(), LONG2NUM, minus_dd(), rb_eTypeError, rb_raise(), RFLOAT_VALUE, T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, and TYPE.
Referenced by d_lite_prev_day(), and Init_date_core().
Definition at line 4911 of file date_core.c.
References f_sub, get_d1, INT2FIX, and m_real_local_jd().
Referenced by Init_date_core().
Definition at line 4982 of file date_core.c.
References get_d1, INT2FIX, and m_mon().
Referenced by Init_date_core().
Definition at line 5130 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 5568 of file date_core.c.
References dup_obj_with_new_offset(), rb_scan_args(), and val2off.
Referenced by Init_date_core().
Definition at line 5472 of file date_core.c.
References DEFAULT_SG, dup_obj_with_new_start(), rb_scan_args(), and val2sg.
Referenced by Init_date_core().
Definition at line 6049 of file date_core.c.
References d_lite_next_day(), and NULL.
Referenced by Init_date_core().
Definition at line 6015 of file date_core.c.
References d_lite_plus(), INT2FIX, and rb_scan_args().
Referenced by d_lite_next(), and Init_date_core().
Definition at line 6132 of file date_core.c.
References d_lite_rshift(), INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 6166 of file date_core.c.
References d_lite_rshift(), f_mul, INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 5303 of file date_core.c.
References get_d1, and m_of_in_day().
Referenced by Init_date_core().
Definition at line 5601 of file date_core.c.
References canonicalize_jd, CM_PERIOD, COMPLEX_DAT, d_complex_new_internal(), d_simple_new_internal(), DAY_IN_SECONDS, DBL2NUM, DIV, EX_HOUR, EX_MIN, EX_SEC, f_add, f_floor, f_ge_p(), f_idiv, f_lt_p(), f_mod, f_mul, f_negate, f_positive_p, f_sub, f_to_r, f_zero_p(), FIX2INT, FIX2LONG, get_d1, HAVE_CIVIL, HAVE_DF, HAVE_JD, HAVE_TIME, i, INT2FIX, k_numeric_p(), k_rational_p(), m_df(), m_jd(), m_nth(), m_of(), m_sf(), m_sg(), MOD, rb_eTypeError, rb_obj_class(), rb_raise(), RFLOAT_VALUE, round(), RRATIONAL, SECOND_IN_NANOSECONDS, simple_dat_p, T_BIGNUM, T_FIXNUM, T_FLOAT, T_RATIONAL, TYPE, USE_PACK, and wholenum_p().
Referenced by d_lite_downto(), d_lite_minus(), d_lite_next_day(), d_lite_rshift(), d_lite_step(), d_lite_upto(), and Init_date_core().
Definition at line 6032 of file date_core.c.
References d_lite_minus(), INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 6149 of file date_core.c.
References d_lite_lshift(), INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 6183 of file date_core.c.
References d_lite_lshift(), f_mul, INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 7178 of file date_core.c.
References set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 7165 of file date_core.c.
References set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 6068 of file date_core.c.
References d_lite_plus(), DIV, encode_jd(), f_add3, f_idiv, f_mod, f_mul, f_sub, FIX2INT, FIX2LONG, FIXNUM_P, get_d1, INT2FIX, LONG2NUM, m_mday(), m_mon(), m_real_local_jd(), m_real_year(), m_sg(), MOD, rb_eArgError, rb_raise(), and valid_civil_p().
Referenced by d_lite_lshift(), d_lite_next_month(), d_lite_next_year(), and Init_date_core().
Definition at line 3044 of file date_core.c.
References d_lite_s_alloc_complex().
Referenced by Init_date_core().
Definition at line 3032 of file date_core.c.
References d_complex_new_internal(), DEFAULT_SG, HAVE_DF, HAVE_JD, and INT2FIX.
Referenced by d_lite_s_alloc(), date_to_datetime(), dup_obj(), and dup_obj_as_complex().
Definition at line 3022 of file date_core.c.
References d_simple_new_internal(), DEFAULT_SG, HAVE_JD, and INT2FIX.
Referenced by date_to_datetime(), datetime_to_date(), and dup_obj().
Definition at line 5195 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 5268 of file date_core.c.
References get_d1, INT2FIX, and m_sec().
Referenced by Init_date_core().
Definition at line 5286 of file date_core.c.
References get_d1, and m_sf_in_sec().
Referenced by Init_date_core().
Definition at line 5400 of file date_core.c.
References DBL2NUM, get_d1, and m_sg().
Referenced by Init_date_core().
Definition at line 6209 of file date_core.c.
References d_lite_cmp(), d_lite_plus(), f_cmp(), f_zero_p(), FIX2INT, INT2FIX, rb_eArgError, rb_raise(), rb_scan_args(), rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_date_core().
Definition at line 7107 of file date_core.c.
References date_strftime_internal(), and set_tmx().
Referenced by Init_date_core().
Definition at line 5117 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 5169 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 6639 of file date_core.c.
References set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 5143 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 6257 of file date_core.c.
References d_lite_cmp(), d_lite_plus(), FIX2INT, INT2FIX, rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_date_core().
Definition at line 5104 of file date_core.c.
References get_d1, INT2FIX, and m_wday().
Referenced by Init_date_core(), and rt_complete_frags().
Definition at line 5156 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 4964 of file date_core.c.
References get_d1, INT2FIX, and m_yday().
Referenced by Init_date_core().
Definition at line 4947 of file date_core.c.
References get_d1, and m_real_year().
Referenced by Init_date_core(), and rt_complete_frags().
Definition at line 5320 of file date_core.c.
References get_d1, and m_zone().
Referenced by Init_date_core().
Definition at line 4159 of file date_core.c.
References c_valid_start_p(), d_simple_new_internal(), decode_jd(), DEFAULT_SG, HAVE_JD, INT2FIX, NIL_P, NUM2DBL, rb_eArgError, rb_raise(), rb_warning(), ref_hash, rt__valid_civil_p(), rt__valid_date_frags_p(), rt_complete_frags(), and rt_rewrite_frags().
Referenced by date_s_httpdate(), date_s_iso8601(), date_s_jisx0301(), date_s_parse(), date_s_rfc2822(), date_s_rfc3339(), date_s_strptime(), and date_s_xmlschema().
|
inlinestatic |
Definition at line 2980 of file date_core.c.
References assert, COMPLEX_DAT, d_lite_gc_mark(), Data_Make_Struct, have_civil_p, have_jd_p, and set_to_simple.
Referenced by d_lite_plus(), d_lite_s_alloc_simple(), d_new_by_frags(), date_s_civil(), date_s_commercial(), date_s_jd(), date_s_ordinal(), date_s_today(), and time_to_date().
Definition at line 3160 of file date_core.c.
References f_idiv, f_mod, INT2FIX, to_integer(), and wholenum_p().
Definition at line 2332 of file date_parse.c.
References hash(), httpdate_type1(), httpdate_type2(), httpdate_type3(), rb_backref_get(), rb_backref_set(), rb_hash_new(), and rb_match_busy().
Referenced by date_s__httpdate().
Definition at line 1899 of file date_parse.c.
References hash(), iso8601_bas_datetime(), iso8601_bas_time(), iso8601_ext_datetime(), iso8601_ext_time(), rb_backref_get(), rb_backref_set(), rb_hash_new(), and rb_match_busy().
Referenced by date__jisx0301(), and date_s__iso8601().
Definition at line 2406 of file date_parse.c.
References date__iso8601(), hash(), jisx0301(), rb_backref_get(), rb_backref_set(), rb_hash_new(), and rb_match_busy().
Referenced by date_s__jisx0301().
Definition at line 1540 of file date_parse.c.
References asp_string, date_zone_to_diff(), del_hash, f_add, f_ge_p, f_gsub_bang, f_le_p, hash(), HAVE_ALPHA, HAVE_DASH, HAVE_DIGIT, HAVE_DOT, HAVE_ELEM_P, HAVE_SLASH, INT2FIX, NIL_P, parse_bc(), parse_day(), parse_ddd(), parse_dot(), parse_eu(), parse_frag(), parse_iso(), parse_iso2(), parse_jis(), parse_mday(), parse_mon(), parse_sla(), parse_time(), parse_us(), parse_vms(), parse_year(), Qnil, rb_backref_get(), rb_backref_set(), rb_hash_new(), rb_match_busy(), rb_str_dup(), ref_hash, REGCOMP_0, RTEST, and set_hash.
Referenced by date_s__parse_internal().
Definition at line 2186 of file date_parse.c.
References hash(), rb_backref_get(), rb_backref_set(), rb_hash_new(), rb_match_busy(), and rfc2822().
Referenced by date_s__rfc2822().
Definition at line 1967 of file date_parse.c.
References hash(), rb_backref_get(), rb_backref_set(), rb_hash_new(), rb_match_busy(), and rfc3339().
Referenced by date_s__rfc3339().
Definition at line 648 of file date_strptime.c.
References date__strptime_internal(), del_hash, f_add, f_mod, f_mul, fail_p, hash(), INT2FIX, NIL_P, Qnil, rb_usascii_str_new(), ref_hash, and set_hash.
Referenced by date_s__strptime_internal().
Definition at line 2113 of file date_parse.c.
References hash(), rb_backref_get(), rb_backref_set(), rb_hash_new(), rb_match_busy(), xmlschema_datetime(), xmlschema_time(), and xmlschema_trunc().
Referenced by date_s__xmlschema().
Definition at line 4604 of file date_core.c.
References date__httpdate().
Referenced by date_s_httpdate(), datetime_s_httpdate(), and Init_date_core().
Definition at line 4427 of file date_core.c.
References date__iso8601().
Referenced by date_s_iso8601(), datetime_s_iso8601(), and Init_date_core().
Definition at line 4649 of file date_core.c.
References date__jisx0301().
Referenced by date_s_jisx0301(), datetime_s_jisx0301(), and Init_date_core().
Definition at line 4365 of file date_core.c.
References date_s__parse_internal().
Referenced by date_s_parse(), datetime_s_parse(), and Init_date_core().
Definition at line 4322 of file date_core.c.
References date__parse(), hash(), NIL_P, OBJ_INFECT, Qtrue, rb_eArgError, rb_enc_copy(), rb_enc_str_asciicompat_p, rb_raise(), rb_scan_args(), ref_hash, set_hash, and StringValue.
Referenced by date_s__parse().
Definition at line 4559 of file date_core.c.
References date__rfc2822().
Referenced by date_s_rfc2822(), datetime_s_rfc2822(), and Init_date_core().
Definition at line 4472 of file date_core.c.
References date__rfc3339().
Referenced by date_s_rfc3339(), datetime_s_rfc3339(), and Init_date_core().
Definition at line 4269 of file date_core.c.
References date_s__strptime_internal().
Referenced by date_s_strptime(), datetime_s_strptime(), and Init_date_core().
|
static |
Definition at line 4204 of file date_core.c.
References date__strptime(), hash(), NIL_P, OBJ_INFECT, Qnil, rb_eArgError, rb_enc_copy(), rb_enc_str_asciicompat_p, rb_hash_new(), rb_raise(), rb_scan_args(), ref_hash, RSTRING_LEN, RSTRING_PTR, set_hash, StringValue, and strlen().
Referenced by date_s__strptime(), and datetime_s__strptime().
Definition at line 4515 of file date_core.c.
References date__xmlschema().
Referenced by date_s_xmlschema(), datetime_s_xmlschema(), and Init_date_core().
Definition at line 3412 of file date_core.c.
References add_frac, d_simple_new_internal(), DEFAULT_SG, guess_style(), HAVE_CIVIL, HAVE_JD, INT2FIX, ComplexDateData::nth, NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), ComplexDateData::sg, val2sg, valid_civil_p(), and valid_gregorian_p().
Referenced by Init_date_core().
Definition at line 3491 of file date_core.c.
References add_frac, d_simple_new_internal(), DEFAULT_SG, HAVE_JD, INT2FIX, ComplexDateData::nth, NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), ComplexDateData::sg, val2sg, and valid_commercial_p().
Referenced by Init_date_core().
Definition at line 2958 of file date_core.c.
References c_gregorian_leap_p(), decode_year(), f_boolcast, and ComplexDateData::nth.
Referenced by Init_date_core().
Definition at line 4623 of file date_core.c.
References d_new_by_frags(), date_s__httpdate(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 4446 of file date_core.c.
References d_new_by_frags(), date_s__iso8601(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 3290 of file date_core.c.
References add_frac, d_simple_new_internal(), decode_jd(), DEFAULT_SG, HAVE_JD, INT2FIX, ComplexDateData::jd, ComplexDateData::nth, num2num_with_frac, positive_inf, rb_scan_args(), ComplexDateData::sg, and val2sg.
Referenced by Init_date_core().
Definition at line 4666 of file date_core.c.
References d_new_by_frags(), date_s__jisx0301(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 2935 of file date_core.c.
References c_julian_leap_p(), decode_year(), f_boolcast, and ComplexDateData::nth.
Referenced by Init_date_core().
Definition at line 3342 of file date_core.c.
References add_frac, d_simple_new_internal(), DEFAULT_SG, HAVE_JD, INT2FIX, ComplexDateData::nth, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), ComplexDateData::sg, val2sg, and valid_ordinal_p().
Referenced by Init_date_core().
Definition at line 4388 of file date_core.c.
References d_new_by_frags(), date_s__parse(), DEFAULT_SG, hash(), INT2FIX, Qtrue, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 4578 of file date_core.c.
References d_new_by_frags(), date_s__rfc2822(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 4489 of file date_core.c.
References d_new_by_frags(), date_s__rfc3339(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 4294 of file date_core.c.
References d_new_by_frags(), date_s__strptime(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 3669 of file date_core.c.
References d_simple_new_internal(), decode_year(), DEFAULT_SG, get_d1, GREGORIAN, HAVE_CIVIL, INT2FIX, localtime_r(), rb_scan_args(), rb_sys_fail(), set_sg(), and val2sg.
Referenced by Init_date_core(), and rt_complete_frags().
Definition at line 2583 of file date_core.c.
References DEFAULT_SG, INT2FIX, NIL_P, Qfalse, Qtrue, rb_scan_args(), and valid_civil_sub().
Referenced by Init_date_core().
Definition at line 2750 of file date_core.c.
References DEFAULT_SG, INT2FIX, NIL_P, Qfalse, Qtrue, rb_scan_args(), and valid_commercial_sub().
Referenced by Init_date_core().
Definition at line 2492 of file date_core.c.
References DEFAULT_SG, INT2FIX, NIL_P, Qfalse, Qtrue, rb_scan_args(), and valid_jd_sub().
Referenced by Init_date_core().
Definition at line 2666 of file date_core.c.
References DEFAULT_SG, INT2FIX, NIL_P, Qfalse, Qtrue, rb_scan_args(), and valid_ordinal_sub().
Referenced by Init_date_core().
Definition at line 4532 of file date_core.c.
References d_new_by_frags(), date_s__xmlschema(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 807 of file date_strftime.c.
References date_strftime_with_tmx().
Referenced by date_strftime_alloc().
Definition at line 6766 of file date_core.c.
References date_strftime(), errno, len, rb_sys_fail(), size, SMALLBUF, strlen(), xfree(), and xmalloc.
Referenced by date_strftime_internal(), and strftimev().
|
static |
Definition at line 6874 of file date_core.c.
References buf, date_strftime_alloc(), len, OBJ_INFECT, p, rb_eArgError, rb_enc_copy(), rb_enc_str_asciicompat_p, rb_raise(), rb_scan_args(), rb_str_cat(), rb_str_new(), rb_usascii_str_new2(), RSTRING_LEN, RSTRING_PTR, SMALLBUF, StringValue, strlen(), and xfree().
Referenced by d_lite_strftime(), and dt_lite_strftime().
Definition at line 8762 of file date_core.c.
Referenced by Init_date_core().
Definition at line 8774 of file date_core.c.
References cDateTime, d_lite_s_alloc_complex(), d_lite_s_alloc_simple(), EX_MDAY, EX_MON, get_d1a, get_d1b, HAVE_DF, HAVE_TIME, INT2FIX, PACK5, and simple_dat_p.
Referenced by Init_date_core().
Definition at line 8745 of file date_core.c.
References f_local3, get_d1, INT2FIX, m_mday(), m_mon(), m_real_year(), and rb_cTime.
Referenced by Init_date_core().
Definition at line 370 of file date_parse.c.
Referenced by offset_to_sec().
Definition at line 8045 of file date_core.c.
References date_s__strptime_internal().
Referenced by Init_date_core().
Definition at line 7530 of file date_core.c.
References add_frac, c_valid_time_p(), canon24oc, d_complex_new_internal(), DEFAULT_SG, guess_style(), HAVE_CIVIL, HAVE_JD, HAVE_TIME, INT2FIX, jd_local_to_utc(), min(), NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), time_to_df(), val2off, val2sg, valid_civil_p(), and valid_gregorian_p().
Referenced by Init_date_core().
Definition at line 7629 of file date_core.c.
References add_frac, c_valid_time_p(), canon24oc, d_complex_new_internal(), DEFAULT_SG, HAVE_JD, HAVE_TIME, INT2FIX, jd_local_to_utc(), min(), NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), time_to_df(), val2off, val2sg, and valid_commercial_p().
Referenced by Init_date_core().
Definition at line 8295 of file date_core.c.
References date_s__httpdate(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 8166 of file date_core.c.
References date_s__iso8601(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 7382 of file date_core.c.
References add_frac, c_valid_time_p(), canon24oc, d_complex_new_internal(), decode_jd(), DEFAULT_SG, HAVE_JD, HAVE_TIME, INT2FIX, jd_local_to_utc(), min(), num2int_with_frac, num2num_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), time_to_df(), val2off, and val2sg.
Referenced by Init_date_core().
Definition at line 8327 of file date_core.c.
References date_s__jisx0301(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 7845 of file date_core.c.
References d_complex_new_internal(), DAY_IN_SECONDS, decode_year(), DEFAULT_SG, get_d1, gettimeofday(), gmtime_r(), GREGORIAN, HAVE_CIVIL, HAVE_TIME, INT2FIX, localtime_r(), long, LONG2NUM, min(), NULL, NUM2DBL, rb_scan_args(), rb_sys_fail(), rb_warning(), set_sg(), timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.
Referenced by Init_date_core().
Definition at line 7452 of file date_core.c.
References add_frac, c_valid_time_p(), canon24oc, d_complex_new_internal(), DEFAULT_SG, HAVE_JD, HAVE_TIME, INT2FIX, jd_local_to_utc(), min(), num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), time_to_df(), val2off, val2sg, and valid_ordinal_p().
Referenced by Init_date_core().
Definition at line 8124 of file date_core.c.
References date_s__parse(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, Qtrue, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 8263 of file date_core.c.
References date_s__rfc2822(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 8198 of file date_core.c.
References date_s__rfc3339(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 8079 of file date_core.c.
References date_s__strptime(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 8230 of file date_core.c.
References date_s__xmlschema(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), and rb_str_new2().
Referenced by Init_date_core().
Definition at line 8841 of file date_core.c.
References cDate, COMPLEX_DAT, copy_complex_to_simple, d_lite_s_alloc_simple(), get_d1a, get_d1b, HAVE_DF, HAVE_TIME, m_local_jd(), and simple_dat_p.
Referenced by Init_date_core().
Definition at line 8873 of file date_core.c.
Referenced by Init_date_core().
Definition at line 8814 of file date_core.c.
References dup_obj_with_new_offset(), f_add, f_getlocal, f_utc6, get_d1, INT2FIX, m_hour(), m_mday(), m_min(), m_mon(), m_real_year(), m_sec(), m_sf_in_sec(), and rb_cTime.
Referenced by Init_date_core().
Definition at line 1006 of file date_core.c.
References DAY_IN_SECONDS, f_mul, FIX2LONG, INT2FIX, LONG2FIX, and safe_mul_p().
Referenced by div_df(), offset_to_sec(), old_to_new(), and tmx_m_secs().
Definition at line 1076 of file date_core.c.
References div_day(), div_df(), and sec_to_ns().
Referenced by old_to_new().
Definition at line 1364 of file date_core.c.
References assert, CM_PERIOD, f_idiv, f_mod, f_zero_p(), FIX2INT, FIXNUM_P, INT2FIX, RB_TYPE_P, and T_BIGNUM.
Referenced by d_new_by_frags(), date_s_jd(), datetime_s_jd(), dt_new_by_frags(), old_to_new(), valid_civil_p(), valid_commercial_p(), valid_ordinal_p(), and valid_weeknum_p().
Definition at line 1313 of file date_core.c.
References CM_PERIOD_GCY, CM_PERIOD_JCY, DIV, f_add, f_idiv, f_mod, f_nonzero_p, FIX2INT, FIX2LONG, FIXNUM_MAX, FIXNUM_P, INT2FIX, LONG2FIX, and MOD.
Referenced by date_s_gregorian_leap_p(), date_s_julian_leap_p(), date_s_today(), datetime_s_now(), time_to_date(), time_to_datetime(), valid_civil_p(), valid_commercial_p(), valid_gregorian_p(), valid_ordinal_p(), and valid_weeknum_p().
|
inlinestatic |
Definition at line 880 of file date_core.c.
References DAY_IN_SECONDS, ComplexDateData::df, and ComplexDateData::of.
Referenced by dt_new_by_frags(), and get_c_df().
|
inlinestatic |
Definition at line 930 of file date_core.c.
References HOUR_IN_SECONDS, and MINUTE_IN_SECONDS.
Referenced by get_c_time().
|
inlinestatic |
Definition at line 891 of file date_core.c.
References DAY_IN_SECONDS, ComplexDateData::df, and ComplexDateData::of.
Referenced by get_c_time(), and local_df().
Definition at line 1046 of file date_core.c.
References f_floor, f_mod, and INT2FIX.
Referenced by decode_day().
Definition at line 1054 of file date_core.c.
References day_to_sec(), f_floor, f_mod, and INT2FIX.
Referenced by decode_day().
Definition at line 8584 of file date_core.c.
References f_add, INT2FIX, iso8601_timediv(), rb_scan_args(), set_tmx(), and strftimev().
Referenced by dt_lite_rfc3339(), and Init_date_core().
Definition at line 8628 of file date_core.c.
References get_d1, INT2FIX, iso8601_timediv(), jisx0301_date(), m_real_local_jd(), m_real_year(), rb_scan_args(), rb_str_append(), RSTRING_PTR, set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 8610 of file date_core.c.
References dt_lite_iso8601().
Referenced by Init_date_core().
Definition at line 8542 of file date_core.c.
References date_strftime_internal(), and set_tmx().
Referenced by Init_date_core().
Definition at line 8359 of file date_core.c.
References set_tmx(), and strftimev().
Referenced by Init_date_core().
Definition at line 7949 of file date_core.c.
References c_valid_start_p(), c_valid_time_p(), d_complex_new_internal(), DAY_IN_SECONDS, decode_jd(), DEFAULT_SG, df_local_to_utc(), f_gt_p(), HAVE_DF, HAVE_JD, INT2FIX, jd_local_to_utc(), NIL_P, NUM2DBL, NUM2INT, rb_eArgError, rb_raise(), rb_warning(), ref_hash, rt__valid_civil_p(), rt__valid_date_frags_p(), rt_complete_frags(), rt_rewrite_frags(), sec_to_ns(), set_hash, and time_to_df().
Referenced by datetime_s_httpdate(), datetime_s_iso8601(), datetime_s_jisx0301(), datetime_s_parse(), datetime_s_rfc2822(), datetime_s_rfc3339(), datetime_s_strptime(), and datetime_s_xmlschema().
Definition at line 4686 of file date_core.c.
References d_lite_s_alloc_complex(), d_lite_s_alloc_simple(), get_d1a, get_d1b, rb_obj_class(), and simple_dat_p.
Referenced by dup_obj_with_new_start().
Definition at line 4709 of file date_core.c.
References COMPLEX_DAT, copy_simple_to_complex, d_lite_s_alloc_complex(), get_d1a, get_d1b, HAVE_DF, rb_obj_class(), and simple_dat_p.
Referenced by dup_obj_with_new_offset().
Definition at line 5545 of file date_core.c.
References dup_obj_as_complex(), get_d1, and set_of().
Referenced by d_lite_httpdate(), d_lite_new_offset(), and datetime_to_time().
Definition at line 5450 of file date_core.c.
References dup_obj(), get_d1, and set_sg().
Referenced by d_lite_england(), d_lite_gregorian(), d_lite_italy(), d_lite_julian(), and d_lite_new_start().
Definition at line 1377 of file date_core.c.
References CM_PERIOD, f_add, f_mul, f_zero_p(), and INT2FIX.
Referenced by d_lite_rshift(), m_real_jd(), m_real_local_jd(), rt__valid_civil_p(), rt__valid_commercial_p(), rt__valid_ordinal_p(), rt__valid_weeknum_p(), valid_civil_sub(), valid_commercial_sub(), and valid_ordinal_sub().
Definition at line 1345 of file date_core.c.
References CM_PERIOD_GCY, CM_PERIOD_JCY, f_add, f_mul, f_zero_p(), and INT2FIX.
Referenced by m_real_cwyear(), and m_real_year().
Definition at line 6496 of file date_core.c.
References f_eqeq_p(), f_jd, get_d1, k_date_p(), k_numeric_p(), m_real_local_jd(), rb_intern, and rb_num_coerce_cmp().
Referenced by d_lite_equal().
Definition at line 51 of file date_core.c.
References FIX2LONG, FIXNUM_P, id_cmp, INT2FIX, and rb_funcall().
Referenced by cmp_gen(), and d_lite_step().
Definition at line 97 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, rb_funcall(), and rb_intern.
Referenced by cmp_dd(), d_lite_cmp(), d_lite_equal(), equal_gen(), float_rationalize(), nucomp_eqeq_p(), nucomp_eql_p(), nurat_eqeq_p(), nurat_rationalize(), offset_to_sec(), old_to_new(), and rt__valid_date_frags_p().
Definition at line 89 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, rb_funcall(), and rb_intern.
Referenced by d_lite_plus(), minus_dd(), and old_to_new().
Definition at line 73 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, and rb_funcall().
Referenced by dt_new_by_frags(), iso8601_timediv(), and rt_complete_frags().
Definition at line 1979 of file date_core.c.
References rb_obj_is_kind_of().
Referenced by k_date_p(), k_datetime_p(), k_numeric_p(), and k_rational_p().
Definition at line 81 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, id_le_p, and rb_funcall().
Referenced by rt_complete_frags().
Definition at line 65 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, and rb_funcall().
Referenced by cmp_dd(), d_lite_cmp(), d_lite_plus(), jisx0301_date(), minus_dd(), and old_to_new().
Definition at line 124 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, INT2FIX, and rb_funcall().
Referenced by c_virtual_sg(), f_gcd(), f_muldiv(), f_signbit(), float_rationalize(), nurat_rationalize(), nurat_round(), nurat_truncate(), and s_virtual_sg().
Definition at line 105 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, id_eqeq_p, INT2FIX, Qfalse, rb_funcall(), RRATIONAL, T_BIGNUM, T_FIXNUM, T_RATIONAL, and TYPE.
Referenced by c_virtual_sg(), d_lite_eql_p(), d_lite_marshal_load(), d_lite_plus(), d_lite_step(), decode_jd(), encode_jd(), encode_year(), m_real_cwyear(), m_real_year(), minus_dd(), rt__valid_date_frags_p(), s_virtual_sg(), valid_civil_p(), valid_commercial_p(), valid_ordinal_p(), and valid_weeknum_p().
|
inlinestatic |
Definition at line 1267 of file date_core.c.
References assert, DateData::c, c_jd_to_civil(), c_virtual_sg(), complex_dat_p, ComplexDateData::df, EX_HOUR, EX_MIN, EX_SEC, ComplexDateData::flags, get_c_df(), HAVE_CIVIL, have_civil_p, have_jd_p, ComplexDateData::jd, jd_utc_to_local(), min(), ComplexDateData::of, PACK5, ComplexDateData::pc, and ComplexDateData::year.
Referenced by m_mday(), m_mon(), m_nth(), m_pc(), and m_year().
|
inlinestatic |
Definition at line 1181 of file date_core.c.
References assert, DateData::c, complex_dat_p, ComplexDateData::df, df_local_to_utc(), EX_HOUR, EX_MIN, EX_SEC, ComplexDateData::flags, HAVE_DF, have_df_p, have_time_p, ComplexDateData::of, ComplexDateData::pc, and time_to_df().
Referenced by get_c_civil(), m_df(), m_local_df(), m_local_jd(), set_of(), and set_sg().
|
inlinestatic |
Definition at line 1235 of file date_core.c.
References assert, DateData::c, c_civil_to_jd(), c_virtual_sg(), complex_dat_p, EX_HOUR, EX_MDAY, EX_MIN, EX_MON, EX_SEC, ComplexDateData::flags, get_c_time(), have_civil_p, HAVE_JD, have_jd_p, ComplexDateData::jd, jd_local_to_utc(), ComplexDateData::of, ComplexDateData::pc, time_to_df(), and ComplexDateData::year.
Referenced by m_canonicalize_jd(), m_jd(), m_julian_p(), m_local_jd(), m_of(), m_sg(), set_of(), and set_sg().
|
inlinestatic |
Definition at line 1200 of file date_core.c.
References assert, DateData::c, complex_dat_p, ComplexDateData::df, df_to_time(), df_utc_to_local(), EX_MDAY, EX_MON, ComplexDateData::flags, have_df_p, HAVE_TIME, have_time_p, min(), ComplexDateData::of, PACK5, and ComplexDateData::pc.
Referenced by get_c_jd(), m_hour(), m_min(), m_pc(), and m_sec().
|
inlinestatic |
Definition at line 1161 of file date_core.c.
References assert, c_jd_to_civil(), SimpleDateData::flags, HAVE_CIVIL, have_civil_p, have_jd_p, SimpleDateData::jd, PACK2, SimpleDateData::pc, DateData::s, s_virtual_sg(), simple_dat_p, and SimpleDateData::year.
|
inlinestatic |
Definition at line 1141 of file date_core.c.
References assert, c_civil_to_jd(), EX_MDAY, EX_MON, SimpleDateData::flags, have_civil_p, HAVE_JD, have_jd_p, SimpleDateData::jd, ComplexDateData::jd, SimpleDateData::pc, DateData::s, s_virtual_sg(), simple_dat_p, and SimpleDateData::year.
Referenced by m_canonicalize_jd(), m_jd(), m_julian_p(), m_local_jd(), and set_sg().
|
static |
Definition at line 3638 of file date_core.c.
Referenced by datetime_s_now().
|
inlinestatic |
Definition at line 1387 of file date_core.c.
References assert, f_positive_p, FIX2LONG, FIXNUM_P, isinf(), negative_inf, positive_inf, REFORM_BEGIN_YEAR, REFORM_END_YEAR, and ComplexDateData::sg.
Referenced by date_s_civil(), datetime_s_civil(), valid_civil_p(), valid_civil_sub(), valid_commercial_p(), valid_ordinal_p(), and valid_weeknum_p().
Definition at line 3179 of file date_core.c.
References f_idiv, f_mod, f_quo, INT2FIX, to_integer(), and wholenum_p().
void Init_date_core | ( | void | ) |
Definition at line 9224 of file date_core.c.
References assert, cDate, cDateTime, CLASS_OF, d_lite_ajd(), d_lite_amjd(), d_lite_asctime(), d_lite_cmp(), d_lite_cwday(), d_lite_cweek(), d_lite_cwyear(), d_lite_day_fraction(), d_lite_downto(), d_lite_england(), d_lite_eql_p(), d_lite_equal(), d_lite_friday_p(), d_lite_gregorian(), d_lite_gregorian_p(), d_lite_hash(), d_lite_hour(), d_lite_httpdate(), d_lite_initialize_copy(), d_lite_inspect(), d_lite_iso8601(), d_lite_italy(), d_lite_jd(), d_lite_jisx0301(), d_lite_julian(), d_lite_julian_p(), d_lite_ld(), d_lite_leap_p(), d_lite_lshift(), d_lite_marshal_dump(), d_lite_marshal_load(), d_lite_mday(), d_lite_min(), d_lite_minus(), d_lite_mjd(), d_lite_mon(), d_lite_monday_p(), d_lite_new_offset(), d_lite_new_start(), d_lite_next(), d_lite_next_day(), d_lite_next_month(), d_lite_next_year(), d_lite_offset(), d_lite_plus(), d_lite_prev_day(), d_lite_prev_month(), d_lite_prev_year(), d_lite_rfc2822(), d_lite_rfc3339(), d_lite_rshift(), d_lite_s_alloc(), d_lite_saturday_p(), d_lite_sec(), d_lite_sec_fraction(), d_lite_start(), d_lite_step(), d_lite_strftime(), d_lite_sunday_p(), d_lite_thursday_p(), d_lite_to_s(), d_lite_tuesday_p(), d_lite_upto(), d_lite_wday(), d_lite_wednesday_p(), d_lite_yday(), d_lite_year(), d_lite_zone(), date_s__httpdate(), date_s__iso8601(), date_s__jisx0301(), date_s__parse(), date_s__rfc2822(), date_s__rfc3339(), date_s__strptime(), date_s__xmlschema(), date_s_civil(), date_s_commercial(), date_s_gregorian_leap_p(), date_s_httpdate(), date_s_iso8601(), date_s_jd(), date_s_jisx0301(), date_s_julian_leap_p(), date_s_ordinal(), date_s_parse(), date_s_rfc2822(), date_s_rfc3339(), date_s_strptime(), date_s_today(), date_s_valid_civil_p(), date_s_valid_commercial_p(), date_s_valid_jd_p(), date_s_valid_ordinal_p(), date_s_xmlschema(), date_to_date(), date_to_datetime(), date_to_time(), datetime_s__strptime(), datetime_s_civil(), datetime_s_commercial(), datetime_s_httpdate(), datetime_s_iso8601(), datetime_s_jd(), datetime_s_jisx0301(), datetime_s_now(), datetime_s_ordinal(), datetime_s_parse(), datetime_s_rfc2822(), datetime_s_rfc3339(), datetime_s_strptime(), datetime_s_xmlschema(), datetime_to_date(), datetime_to_datetime(), datetime_to_time(), day_in_nanoseconds, DAY_IN_SECONDS, DBL2NUM, dt_lite_iso8601(), dt_lite_jisx0301(), dt_lite_rfc3339(), dt_lite_strftime(), dt_lite_to_s(), ENGLAND, f_mul, f_public, GREGORIAN, half_days_in_day, id_cmp, id_eqeq_p, id_ge_p, id_le_p, INFINITY, INT2FIX, ITALY, JULIAN, LONG2NUM, mk_ary_of_str(), negative_inf, positive_inf, rb_cObject, rb_cTime, rb_define_alloc_func(), rb_define_class(), rb_define_const(), rb_define_method(), rb_define_private_method(), rb_define_singleton_method(), rb_gc_register_mark_object(), rb_include_module(), rb_intern, rb_mComparable, rb_rational_new2, rb_singleton_class(), rb_undef_method(), SECOND_IN_NANOSECONDS, time_to_date(), time_to_datetime(), and time_to_time().
|
inlinestatic |
Definition at line 947 of file date_core.c.
References INT2FIX, and sec_to_day().
Referenced by m_ajd(), m_amjd(), m_fr(), m_of_in_day(), and minus_dd().
Definition at line 8549 of file date_core.c.
References f_expt, f_gt_p(), f_quo, f_round, get_d1, INT2FIX, m_sf_in_sec(), rb_f_sprintf(), rb_str_append(), rb_usascii_str_new2(), RSTRING_PTR, set_tmx(), and strftimev().
Referenced by dt_lite_iso8601(), and dt_lite_jisx0301().
|
inlinestatic |
Definition at line 902 of file date_core.c.
References DAY_IN_SECONDS, ComplexDateData::jd, and ComplexDateData::of.
Referenced by datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_ordinal(), dt_new_by_frags(), and get_c_jd().
|
inlinestatic |
Definition at line 913 of file date_core.c.
References DAY_IN_SECONDS, ComplexDateData::jd, and ComplexDateData::of.
Referenced by get_c_civil(), and local_jd().
Definition at line 7198 of file date_core.c.
References f_lt_p(), f_sub, INT2FIX, rb_f_sprintf(), and rb_usascii_str_new2().
Referenced by d_lite_jisx0301(), and dt_lite_jisx0301().
Definition at line 1985 of file date_core.c.
References cDate, and f_kind_of_p().
Referenced by cmp_gen(), d_lite_cmp(), d_lite_eql_p(), d_lite_equal(), d_lite_minus(), and equal_gen().
Definition at line 1991 of file date_core.c.
References cDateTime, and f_kind_of_p().
Definition at line 1997 of file date_core.c.
References f_kind_of_p(), and rb_cNumeric.
Referenced by cmp_gen(), d_lite_minus(), d_lite_plus(), equal_gen(), and offset_to_sec().
Definition at line 2003 of file date_core.c.
References f_kind_of_p(), and rb_cRational.
Referenced by d_lite_plus(), and offset_to_sec().
|
inlinestatic |
Definition at line 1305 of file date_core.c.
References assert, DateData::c, complex_dat_p, ComplexDateData::df, df_utc_to_local(), have_df_p, and ComplexDateData::of.
Referenced by m_local_df().
|
inlinestatic |
Definition at line 1296 of file date_core.c.
References assert, DateData::c, complex_dat_p, ComplexDateData::df, have_df_p, have_jd_p, ComplexDateData::jd, jd_utc_to_local(), and ComplexDateData::of.
Referenced by m_local_jd().
|
static |
Definition at line 3647 of file date_core.c.
Referenced by date_s_today(), and datetime_s_now().
Definition at line 1566 of file date_core.c.
References ComplexDateData::df, f_add, f_mul, f_nonzero_p, f_sub, FIX2LONG, FIXNUM_MAX, FIXNUM_P, HALF_DAYS_IN_SECONDS, INT2FIX, isec_to_day(), LONG2FIX, m_df(), m_real_jd(), m_sf(), ns_to_day(), rb_rational_new2, ComplexDateData::sf, and simple_dat_p.
Referenced by cmp_gen(), and d_lite_ajd().
Definition at line 1598 of file date_core.c.
References ComplexDateData::df, f_add, f_nonzero_p, f_sub, FIX2LONG, FIXNUM_MIN, FIXNUM_P, INT2FIX, isec_to_day(), LONG2FIX, m_df(), m_real_jd(), m_sf(), ns_to_day(), rb_rational_new1, ComplexDateData::sf, and simple_dat_p.
Referenced by d_lite_amjd().
|
inlinestatic |
Definition at line 1408 of file date_core.c.
References canonicalize_c_jd(), canonicalize_s_jd(), get_c_jd(), get_s_jd(), and simple_dat_p.
Referenced by cmp_dd(), d_lite_cmp(), and d_lite_equal().
|
static |
|
static |
Definition at line 1865 of file date_core.c.
References c_jd_to_commercial(), m_local_jd(), and m_virtual_sg().
Referenced by d_lite_cweek().
|
static |
Definition at line 1837 of file date_core.c.
References c_jd_to_commercial(), m_local_jd(), and m_virtual_sg().
Referenced by m_real_cwyear().
|
inlinestatic |
Definition at line 1485 of file date_core.c.
References DateData::c, ComplexDateData::df, get_c_df(), and simple_dat_p.
Referenced by cmp_dd(), d_lite_hash(), d_lite_marshal_dump(), d_lite_plus(), m_ajd(), m_amjd(), minus_dd(), mk_inspect(), and tmx_m_secs().
Definition at line 1546 of file date_core.c.
References ComplexDateData::df, f_add, f_nonzero_p, INT2FIX, isec_to_day(), m_local_df(), m_sf(), ns_to_day(), ComplexDateData::sf, and simple_dat_p.
Referenced by d_lite_day_fraction().
|
inlinestatic |
Definition at line 1676 of file date_core.c.
References m_julian_p().
Referenced by d_lite_cmp(), d_lite_equal(), d_lite_gregorian_p(), d_lite_leap_p(), m_real_cwyear(), and m_real_year().
|
inlinestatic |
Definition at line 1908 of file date_core.c.
References DateData::c, EX_HOUR, get_c_time(), ComplexDateData::pc, and simple_dat_p.
Referenced by d_lite_hour(), and datetime_to_time().
|
inlinestatic |
Definition at line 1432 of file date_core.c.
References DateData::c, get_c_jd(), get_s_jd(), SimpleDateData::jd, ComplexDateData::jd, DateData::s, and simple_dat_p.
Referenced by cmp_dd(), d_lite_cmp(), d_lite_hash(), d_lite_marshal_dump(), d_lite_plus(), m_real_jd(), and minus_dd().
|
static |
Definition at line 1655 of file date_core.c.
References DateData::c, c_virtual_sg(), get_c_jd(), get_s_jd(), isinf(), SimpleDateData::jd, ComplexDateData::jd, positive_inf, DateData::s, s_virtual_sg(), ComplexDateData::sg, and simple_dat_p.
Referenced by d_lite_julian_p(), and m_gregorian_p().
|
static |
Definition at line 1504 of file date_core.c.
References get_c_df(), local_df(), and simple_dat_p.
Referenced by m_fr().
|
static |
Definition at line 1458 of file date_core.c.
References get_c_df(), get_c_jd(), get_s_jd(), SimpleDateData::jd, local_jd(), DateData::s, and simple_dat_p.
Referenced by d_lite_equal(), datetime_to_date(), m_cweek(), m_cwyear(), m_real_local_jd(), m_wday(), m_wnumx(), and m_yday().
|
inlinestatic |
Definition at line 1773 of file date_core.c.
References DateData::c, EX_MDAY, get_c_civil(), get_s_civil(), SimpleDateData::pc, ComplexDateData::pc, DateData::s, and simple_dat_p.
Referenced by d_lite_cmp(), d_lite_equal(), d_lite_mday(), d_lite_rshift(), date_to_time(), datetime_to_time(), and m_yday().
|
inlinestatic |
Definition at line 1923 of file date_core.c.
References DateData::c, EX_MIN, get_c_time(), ComplexDateData::pc, and simple_dat_p.
Referenced by d_lite_min(), and datetime_to_time().
|
inlinestatic |
Definition at line 1752 of file date_core.c.
References DateData::c, EX_MON, get_c_civil(), get_s_civil(), SimpleDateData::pc, ComplexDateData::pc, DateData::s, and simple_dat_p.
Referenced by d_lite_cmp(), d_lite_equal(), d_lite_mon(), d_lite_rshift(), date_to_time(), datetime_to_time(), and m_yday().
Definition at line 1421 of file date_core.c.
References DateData::c, get_c_civil(), SimpleDateData::nth, ComplexDateData::nth, DateData::s, and simple_dat_p.
Referenced by cmp_dd(), d_lite_cmp(), d_lite_equal(), d_lite_hash(), d_lite_marshal_dump(), d_lite_plus(), m_real_cwyear(), m_real_jd(), m_real_local_jd(), m_real_year(), and minus_dd().
|
inlinestatic |
Definition at line 1627 of file date_core.c.
References DateData::c, get_c_jd(), ComplexDateData::of, and simple_dat_p.
Referenced by d_lite_marshal_dump(), d_lite_plus(), m_of_in_day(), m_zone(), mk_inspect(), and tmx_m_of().
Definition at line 1638 of file date_core.c.
References isec_to_day(), and m_of().
Referenced by d_lite_offset().
|
inlinestatic |
Definition at line 1737 of file date_core.c.
References DateData::c, get_c_civil(), get_c_time(), get_s_civil(), SimpleDateData::pc, ComplexDateData::pc, DateData::s, and simple_dat_p.
Referenced by d_lite_cmp(), and d_lite_equal().
|
inlinestatic |
Definition at line 1693 of file date_core.c.
References isinf(), m_sg(), and ComplexDateData::sg.
Referenced by m_yday().
|
inlinestatic |
Definition at line 1682 of file date_core.c.
References isinf(), m_sg(), and ComplexDateData::sg.
Referenced by m_yday().
Definition at line 1847 of file date_core.c.
References encode_year(), f_zero_p(), INT2FIX, m_cwyear(), m_gregorian_p(), m_nth(), ComplexDateData::nth, and ComplexDateData::year.
Referenced by d_lite_cwyear().
Definition at line 1445 of file date_core.c.
References encode_jd(), ComplexDateData::jd, m_jd(), m_nth(), and ComplexDateData::nth.
Referenced by m_ajd(), m_amjd(), mk_inspect(), and tmx_m_secs().
Definition at line 1472 of file date_core.c.
References encode_jd(), ComplexDateData::jd, m_local_jd(), m_nth(), and ComplexDateData::nth.
Referenced by d_lite_jd(), d_lite_jisx0301(), d_lite_ld(), d_lite_mjd(), d_lite_rshift(), dt_lite_jisx0301(), and equal_gen().
Definition at line 1717 of file date_core.c.
References encode_year(), f_zero_p(), INT2FIX, m_gregorian_p(), m_nth(), m_year(), ComplexDateData::nth, and ComplexDateData::year.
Referenced by d_lite_jisx0301(), d_lite_rshift(), d_lite_year(), date_to_time(), datetime_to_time(), and dt_lite_jisx0301().
|
inlinestatic |
Definition at line 1938 of file date_core.c.
References DateData::c, EX_SEC, get_c_time(), ComplexDateData::pc, and simple_dat_p.
Referenced by d_lite_sec(), and datetime_to_time().
Definition at line 1523 of file date_core.c.
References DateData::c, INT2FIX, ComplexDateData::sf, and simple_dat_p.
Referenced by cmp_dd(), d_lite_hash(), d_lite_marshal_dump(), d_lite_plus(), m_ajd(), m_amjd(), m_fr(), m_sf_in_sec(), minus_dd(), mk_inspect(), and tmx_m_msecs().
Definition at line 1540 of file date_core.c.
References m_sf(), and ns_to_sec().
Referenced by d_lite_sec_fraction(), datetime_to_time(), and iso8601_timediv().
|
inlinestatic |
Definition at line 1644 of file date_core.c.
References DateData::c, get_c_jd(), DateData::s, SimpleDateData::sg, ComplexDateData::sg, and simple_dat_p.
Referenced by d_lite_marshal_dump(), d_lite_plus(), d_lite_rshift(), d_lite_start(), m_proleptic_gregorian_p(), m_proleptic_julian_p(), and mk_inspect().
|
inlinestatic |
Definition at line 1110 of file date_core.c.
References c_virtual_sg(), s_virtual_sg(), and simple_dat_p.
Referenced by d_lite_leap_p(), m_cweek(), m_cwyear(), m_wnumx(), and m_yday().
|
static |
Definition at line 1831 of file date_core.c.
References c_jd_to_wday(), and m_local_jd().
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(), d_lite_wednesday_p(), and m_cwday().
|
static |
Definition at line 1896 of file date_core.c.
References m_wnumx().
|
static |
Definition at line 1902 of file date_core.c.
References m_wnumx().
|
static |
Definition at line 1886 of file date_core.c.
References c_jd_to_weeknum(), m_local_jd(), and m_virtual_sg().
|
static |
Definition at line 1813 of file date_core.c.
References c_gregorian_to_yday(), c_jd_to_ordinal(), c_julian_to_yday(), ComplexDateData::jd, m_local_jd(), m_mday(), m_mon(), m_proleptic_gregorian_p(), m_proleptic_julian_p(), m_virtual_sg(), m_year(), and ComplexDateData::sg.
Referenced by d_lite_yday().
|
inlinestatic |
Definition at line 1704 of file date_core.c.
References DateData::c, get_c_civil(), get_s_civil(), DateData::s, simple_dat_p, SimpleDateData::year, and ComplexDateData::year.
Referenced by d_lite_cmp(), d_lite_equal(), d_lite_leap_p(), m_real_year(), and m_yday().
Definition at line 1971 of file date_core.c.
References m_of(), of2str(), rb_usascii_str_new2(), and simple_dat_p.
Referenced by d_lite_zone(), and tmx_m_zone().
Definition at line 3196 of file date_core.c.
References f_idiv, f_mod, f_quo, INT2FIX, to_integer(), and wholenum_p().
Definition at line 5918 of file date_core.c.
References canonicalize_jd, CM_PERIOD, DAY_IN_SECONDS, f_add, f_ge_p(), f_lt_p(), f_mul, f_nonzero_p, f_sub, f_zero_p(), get_d2, INT2FIX, isec_to_day(), m_df(), m_jd(), m_nth(), m_sf(), ns_to_day(), rb_rational_new1, SECOND_IN_NANOSECONDS, T_RATIONAL, and TYPE.
Referenced by d_lite_minus().
Definition at line 9202 of file date_core.c.
References i, len, Qnil, rb_ary_new2(), rb_ary_push(), rb_obj_freeze(), and rb_usascii_str_new2().
Referenced by Init_date_core().
Definition at line 6717 of file date_core.c.
References f_inspect, m_df(), m_of(), m_real_jd(), m_sf(), m_sg(), rb_enc_sprintf(), RB_GC_GUARD, rb_usascii_encoding(), and RSTRING_PTR.
Referenced by d_lite_inspect().
Definition at line 953 of file date_core.c.
References day_in_nanoseconds, f_quo, FIXNUM_P, and rb_rational_new2.
Referenced by m_ajd(), m_amjd(), m_fr(), and minus_dd().
Definition at line 971 of file date_core.c.
References f_quo, FIXNUM_P, INT2FIX, rb_rational_new2, and SECOND_IN_NANOSECONDS.
Referenced by m_sf_in_sec().
|
static |
Definition at line 1962 of file date_core.c.
References decode_offset, rb_enc_sprintf(), and rb_usascii_encoding().
Referenced by m_zone().
|
static |
Definition at line 2355 of file date_core.c.
References date_zone_to_diff(), DAY_IN_SECONDS, day_to_sec(), f_eqeq_p(), f_round, f_to_r, FIX2LONG, FIXNUM_P, k_numeric_p(), k_rational_p(), rb_eTypeError, rb_raise(), rb_warning(), RFLOAT_VALUE, round(), RRATIONAL, T_FIXNUM, T_FLOAT, T_RATIONAL, T_STRING, and TYPE.
|
static |
Definition at line 3050 of file date_core.c.
References c_valid_start_p(), DAY_IN_SECONDS, day_to_sec(), decode_day(), decode_jd(), DEFAULT_SG, ComplexDateData::df, f_add, f_eqeq_p(), f_ge_p(), f_lt_p(), f_round, half_days_in_day, INT2FIX, ComplexDateData::jd, NUM2DBL, NUM2INT, rb_eArgError, rb_raise(), rb_warning(), SECOND_IN_NANOSECONDS, and ComplexDateData::sf.
Referenced by d_lite_marshal_load().
Definition at line 4017 of file date_core.c.
References encode_jd(), NUM2DBL, NUM2INT, Qnil, and valid_civil_p().
Referenced by d_new_by_frags(), dt_new_by_frags(), and rt__valid_date_frags_p().
Definition at line 4032 of file date_core.c.
References encode_jd(), NUM2DBL, NUM2INT, Qnil, and valid_commercial_p().
Referenced by rt__valid_date_frags_p().
Definition at line 4062 of file date_core.c.
References f_eqeq_p(), f_mod, f_sub, f_zero_p(), INT2FIX, NIL_P, Qnil, ref_hash, rt__valid_civil_p(), rt__valid_commercial_p(), rt__valid_jd_p(), rt__valid_ordinal_p(), and rt__valid_weeknum_p().
Referenced by d_new_by_frags(), and dt_new_by_frags().
Definition at line 3996 of file date_core.c.
Referenced by rt__valid_date_frags_p().
Definition at line 4002 of file date_core.c.
References encode_jd(), NUM2DBL, NUM2INT, Qnil, and valid_ordinal_p().
Referenced by rt__valid_date_frags_p().
Definition at line 4047 of file date_core.c.
References encode_jd(), NUM2DBL, NUM2INT, Qnil, and valid_weeknum_p().
Referenced by rt__valid_date_frags_p().
Definition at line 3755 of file date_core.c.
References cDate, cDateTime, d_lite_jd(), d_lite_wday(), d_lite_year(), date_s_today(), f_add, f_gt_p(), f_le_p(), f_sub, hash(), i, INT2FIX, NIL_P, Qnil, RARRAY_LENINT, RARRAY_PTR, rb_ary_new3(), rb_funcall(), rb_gc_register_mark_object(), ref_hash, ref_hash0, set_hash, set_hash0, sym, and SYM2ID.
Referenced by d_new_by_frags(), and dt_new_by_frags().
Definition at line 3717 of file date_core.c.
References DAY_IN_SECONDS, del_hash, f_add, f_idiv, f_mod, hash(), HOUR_IN_SECONDS, INT2FIX, min(), MINUTE_IN_SECONDS, NIL_P, ref_hash, set_hash, and UNIX_EPOCH_IN_CJD.
Referenced by d_new_by_frags(), and dt_new_by_frags().
Definition at line 3213 of file date_core.c.
References f_idiv, f_mod, f_quo, INT2FIX, to_integer(), and wholenum_p().
|
inlinestatic |
Definition at line 1086 of file date_core.c.
References f_negative_p(), f_zero_p(), isinf(), negative_inf, SimpleDateData::nth, positive_inf, DateData::s, and SimpleDateData::sg.
Referenced by get_s_civil(), get_s_jd(), m_julian_p(), and m_virtual_sg().
Definition at line 987 of file date_core.c.
References FIX2LONG, FIXNUM_MAX, FIXNUM_MIN, and FIXNUM_P.
Referenced by day_to_sec(), sec_to_ms(), and sec_to_ns().
Definition at line 939 of file date_core.c.
References DAY_IN_SECONDS, f_quo, FIXNUM_P, INT2FIX, and rb_rational_new2.
Referenced by isec_to_day().
Definition at line 1022 of file date_core.c.
References f_mul, FIX2LONG, INT2FIX, LONG2FIX, safe_mul_p(), and SECOND_IN_MILLISECONDS.
Referenced by tmx_m_msecs().
Definition at line 1030 of file date_core.c.
References f_mul, FIX2LONG, INT2FIX, LONG2FIX, safe_mul_p(), and SECOND_IN_NANOSECONDS.
Referenced by decode_day(), dt_new_by_frags(), and time_to_datetime().
|
static |
Definition at line 5535 of file date_core.c.
References assert, DateData::c, clear_civil(), complex_dat_p, get_c_df(), get_c_jd(), and ComplexDateData::of.
Referenced by dup_obj_with_new_offset().
|
static |
Definition at line 5435 of file date_core.c.
References DateData::c, clear_civil(), get_c_df(), get_c_jd(), get_s_jd(), DateData::s, SimpleDateData::sg, ComplexDateData::sg, and simple_dat_p.
Referenced by date_s_today(), datetime_s_now(), dup_obj_with_new_start(), time_to_date(), and time_to_datetime().
Definition at line 6866 of file date_core.c.
References tmx::dat, tmx::funcs, get_d1, and tmx_funcs.
Referenced by d_lite_asctime(), d_lite_httpdate(), d_lite_iso8601(), d_lite_jisx0301(), d_lite_rfc2822(), d_lite_rfc3339(), d_lite_strftime(), d_lite_to_s(), dt_lite_iso8601(), dt_lite_jisx0301(), dt_lite_strftime(), dt_lite_to_s(), and iso8601_timediv().
Definition at line 7114 of file date_core.c.
References buf, date_strftime_alloc(), len, rb_usascii_str_new(), SMALLBUF, and xfree().
Referenced by d_lite_asctime(), d_lite_httpdate(), d_lite_iso8601(), d_lite_jisx0301(), d_lite_rfc2822(), d_lite_rfc3339(), d_lite_to_s(), dt_lite_iso8601(), dt_lite_jisx0301(), dt_lite_to_s(), and iso8601_timediv().
Definition at line 8674 of file date_core.c.
References cDate, d_simple_new_internal(), decode_year(), DEFAULT_SG, f_mday, f_mon, f_year, FIX2INT, get_d1, GREGORIAN, HAVE_CIVIL, and set_sg().
Referenced by Init_date_core().
Definition at line 8704 of file date_core.c.
References cDateTime, d_complex_new_internal(), decode_year(), DEFAULT_SG, f_hour, f_mday, f_min, f_mon, f_sec, f_subsec, f_utc_offset, f_year, FIX2INT, get_d1, HAVE_CIVIL, HAVE_TIME, min(), sec_to_ns(), and set_sg().
Referenced by Init_date_core().
|
inlinestatic |
Definition at line 924 of file date_core.c.
References HOUR_IN_SECONDS, and MINUTE_IN_SECONDS.
Referenced by datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_ordinal(), dt_new_by_frags(), get_c_df(), and get_c_jd().
Definition at line 8662 of file date_core.c.
References rb_funcall(), and rb_intern.
Referenced by Init_date_core().
Definition at line 6819 of file date_core.c.
References f_add, f_div, f_nonzero_p, INT2FIX, m_sf(), MILLISECOND_IN_NANOSECONDS, sec_to_ms(), simple_dat_p, and tmx_m_secs().
Definition at line 6833 of file date_core.c.
Definition at line 6801 of file date_core.c.
References day_to_sec(), f_add, f_sub, INT2FIX, m_df(), m_real_jd(), simple_dat_p, and UNIX_EPOCH_IN_CJD.
Referenced by tmx_m_msecs().
|
static |
Definition at line 6839 of file date_core.c.
References m_zone(), and RSTRING_PTR.
Definition at line 3152 of file date_core.c.
References f_to_i, FIXNUM_P, RB_TYPE_P, and T_BIGNUM.
Referenced by d_trunc(), h_trunc(), min_trunc(), and s_trunc().
|
static |
Definition at line 2225 of file date_core.c.
References c_civil_to_jd(), c_valid_civil_p(), c_valid_gregorian_p(), c_valid_julian_p(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, and ComplexDateData::jd.
Referenced by d_lite_rshift(), date_s_civil(), datetime_s_civil(), rt__valid_civil_p(), and valid_civil_sub().
Definition at line 2511 of file date_core.c.
References encode_jd(), guess_style(), INT2FIX, ComplexDateData::nth, NUM2DBL, NUM2INT, Qnil, ComplexDateData::sg, valid_civil_p(), valid_gregorian_p(), and valid_sg.
Referenced by date_s_valid_civil_p().
|
static |
Definition at line 2261 of file date_core.c.
References c_valid_commercial_p(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, and ComplexDateData::jd.
Referenced by date_s_commercial(), datetime_s_commercial(), rt__valid_commercial_p(), and valid_commercial_sub().
Definition at line 2686 of file date_core.c.
References encode_jd(), INT2FIX, ComplexDateData::nth, NUM2DBL, NUM2INT, Qnil, ComplexDateData::sg, valid_commercial_p(), and valid_sg.
Referenced by date_s_valid_commercial_p().
|
static |
Definition at line 2216 of file date_core.c.
References c_valid_gregorian_p(), and decode_year().
Referenced by date_s_civil(), datetime_s_civil(), and valid_civil_sub().
Definition at line 2453 of file date_core.c.
References NUM2DBL, and valid_sg.
Referenced by date_s_valid_jd_p().
|
static |
Definition at line 2186 of file date_core.c.
References c_valid_ordinal_p(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, and ComplexDateData::jd.
Referenced by date_s_ordinal(), datetime_s_ordinal(), rt__valid_ordinal_p(), and valid_ordinal_sub().
Definition at line 2604 of file date_core.c.
References encode_jd(), INT2FIX, ComplexDateData::nth, NUM2DBL, NUM2INT, Qnil, ComplexDateData::sg, valid_ordinal_p(), and valid_sg.
Referenced by date_s_valid_ordinal_p().
|
static |
Definition at line 2291 of file date_core.c.
References c_valid_weeknum_p(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, and ComplexDateData::jd.
Referenced by rt__valid_weeknum_p().
|
inlinestatic |
Definition at line 3128 of file date_core.c.
References FIX2LONG, FIXNUM_P, RFLOAT_VALUE, round(), RRATIONAL, T_BIGNUM, T_FLOAT, T_RATIONAL, and TYPE.
Referenced by d_lite_plus(), d_trunc(), h_trunc(), min_trunc(), and s_trunc().
|
static |
Definition at line 9196 of file date_core.c.
|
static |
Definition at line 9184 of file date_core.c.
|
static |
Definition at line 20 of file date_core.c.
Referenced by datetime_to_date(), Init_date_core(), k_date_p(), rt_complete_frags(), and time_to_date().
|
static |
Definition at line 20 of file date_core.c.
Referenced by date_to_datetime(), Init_date_core(), k_datetime_p(), rt_complete_frags(), and time_to_datetime().
|
static |
Definition at line 21 of file date_core.c.
Referenced by Init_date_core(), and ns_to_day().
|
static |
Definition at line 9191 of file date_core.c.
|
static |
Definition at line 21 of file date_core.c.
Referenced by Init_date_core(), and old_to_new().
|
static |
Definition at line 19 of file date_core.c.
Referenced by f_cmp(), and Init_date_core().
|
static |
Definition at line 19 of file date_core.c.
Referenced by f_zero_p(), and Init_date_core().
|
static |
Definition at line 19 of file date_core.c.
Referenced by Init_date_core().
|
static |
Definition at line 19 of file date_core.c.
Referenced by f_le_p(), and Init_date_core().
|
static |
Definition at line 9176 of file date_core.c.
|
static |
Definition at line 679 of file date_core.c.
|
static |
Definition at line 22 of file date_core.c.
Referenced by c_virtual_sg(), guess_style(), Init_date_core(), and s_virtual_sg().
|
static |
Definition at line 22 of file date_core.c.
Referenced by c_virtual_sg(), date_s_civil(), date_s_commercial(), date_s_jd(), date_s_ordinal(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_ordinal(), guess_style(), Init_date_core(), m_julian_p(), and s_virtual_sg().
Definition at line 6844 of file date_core.c.
Referenced by set_tmx().
|
static |
Definition at line 1793 of file date_core.c.