Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ruby.h"
#include "ruby/encoding.h"
#include "ruby/util.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 | date_sg_t double |
#define | get_d1(x) |
#define | get_d1a(x) |
#define | get_d1b(x) |
#define | get_d2(x, y) |
#define | set_to_simple(obj, x, _nth, _jd, _sg, _year, _mon, _mday, _flags) |
#define | set_to_complex(obj, x, _nth, _jd, _df, _sf, _of, _sg, _year, _mon, _mday, _hour, _min, _sec, _flags) |
#define | copy_simple_to_complex(obj, x, y) |
#define | copy_complex_to_simple(obj, 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_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 | rb_intern(str) rb_intern_const(str) |
#define | f_public(m, s) |
Enumerations | |
enum | { DECIMAL_SIZE_OF_LONG = DECIMAL_SIZE_OF_BITS(CHAR_BIT*sizeof(long)), JISX0301_DATE_SIZE = DECIMAL_SIZE_OF_LONG+8 } |
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 (VALUE obj, 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 (VALUE obj, 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 (VALUE obj, union DateData *x) |
static VALUE | m_nth (union DateData *x) |
static int | m_jd (union DateData *x) |
static VALUE | m_real_jd (union DateData *x) |
static int | m_local_jd (union DateData *x) |
static VALUE | m_real_local_jd (union DateData *x) |
static int | m_df (union DateData *x) |
static int | m_local_df (union DateData *x) |
static VALUE | m_sf (union DateData *x) |
static VALUE | m_sf_in_sec (union DateData *x) |
static VALUE | m_fr (union DateData *x) |
static VALUE | m_ajd (union DateData *x) |
static VALUE | m_amjd (union DateData *x) |
static int | m_of (union DateData *x) |
static VALUE | m_of_in_day (union DateData *x) |
static double | m_sg (union DateData *x) |
static int | m_julian_p (union DateData *x) |
static int | m_gregorian_p (union DateData *x) |
static int | m_proleptic_julian_p (union DateData *x) |
static int | m_proleptic_gregorian_p (union DateData *x) |
static int | m_year (union DateData *x) |
static VALUE | m_real_year (union DateData *x) |
static int | m_mon (union DateData *x) |
static int | m_mday (union DateData *x) |
static int | c_julian_to_yday (int y, int m, int d) |
static int | c_gregorian_to_yday (int y, int m, int d) |
static int | m_yday (union DateData *x) |
static int | m_wday (union DateData *x) |
static int | m_cwyear (union DateData *x) |
static VALUE | m_real_cwyear (union DateData *x) |
static int | m_cweek (union DateData *x) |
static int | m_cwday (union DateData *x) |
static int | m_wnumx (union DateData *x, int f) |
static int | m_wnum0 (union DateData *x) |
static int | m_wnum1 (union DateData *x) |
static int | m_hour (union DateData *x) |
static int | m_min (union DateData *x) |
static int | m_sec (union DateData *x) |
static VALUE | of2str (int of) |
static VALUE | m_zone (union DateData *x) |
static VALUE | f_kind_of_p (VALUE x, VALUE c) |
static VALUE | k_date_p (VALUE x) |
static VALUE | k_numeric_p (VALUE x) |
static VALUE | k_rational_p (VALUE x) |
static void | expect_numeric (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 (void *ptr) |
static size_t | d_lite_memsize (const void *ptr) |
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, VALUE klass, VALUE to_s) |
static VALUE | d_lite_inspect (VALUE self) |
size_t | date_strftime (char *s, size_t maxsize, const char *format, const struct tmx *tmx) |
static size_t | date_strftime_alloc (char **buf, const char *format, struct tmx *tmx) |
static VALUE | tmx_m_secs (union DateData *x) |
static VALUE | tmx_m_msecs (union DateData *x) |
static int | tmx_m_of (union DateData *x) |
static char * | tmx_m_zone (union DateData *x) |
static VALUE | date_strftime_internal (int argc, VALUE *argv, VALUE self, const char *default_fmt, void(*func)(VALUE, struct tmx *)) |
static VALUE | d_lite_strftime (int argc, VALUE *argv, VALUE self) |
static VALUE | d_lite_asctime (VALUE self) |
static VALUE | d_lite_iso8601 (VALUE self) |
static VALUE | d_lite_rfc3339 (VALUE self) |
static VALUE | d_lite_rfc2822 (VALUE self) |
static VALUE | d_lite_httpdate (VALUE self) |
static const char * | jisx0301_date_format (char *fmt, size_t size, VALUE jd, VALUE y) |
static VALUE | d_lite_jisx0301 (VALUE self) |
static VALUE | d_lite_marshal_dump (VALUE self) |
static VALUE | d_lite_marshal_load (VALUE self, VALUE a) |
static VALUE | date_s__load (VALUE klass, VALUE s) |
static VALUE | datetime_s_jd (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_ordinal (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_civil (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_commercial (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_now (int argc, VALUE *argv, VALUE klass) |
static VALUE | dt_new_by_frags (VALUE klass, VALUE hash, VALUE sg) |
static VALUE | datetime_s__strptime (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_strptime (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_parse (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_iso8601 (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_rfc3339 (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_xmlschema (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_rfc2822 (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_httpdate (int argc, VALUE *argv, VALUE klass) |
static VALUE | datetime_s_jisx0301 (int argc, VALUE *argv, VALUE klass) |
static VALUE | dt_lite_to_s (VALUE self) |
static VALUE | dt_lite_strftime (int argc, VALUE *argv, VALUE self) |
static VALUE | iso8601_timediv (VALUE self, long 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 const rb_data_type_t | d_lite_type |
static const 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 3237 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 3229 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 1111 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 183 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 182 of file date_core.c.
#define CM_PERIOD_GCY (CM_PERIOD / GC_PERIOD0 * 400) |
Definition at line 185 of file date_core.c.
Referenced by decode_year(), and encode_year().
#define CM_PERIOD_JCY (CM_PERIOD / JC_PERIOD0 * 4) |
Definition at line 184 of file date_core.c.
Referenced by decode_year(), and encode_year().
#define COMPLEX_DAT (1 << 7) |
Definition at line 157 of file date_core.c.
Referenced by d_complex_new_internal(), d_lite_initialize_copy(), d_lite_marshal_load(), d_lite_plus(), d_lite_to_s(), d_simple_new_internal(), datetime_to_date(), and dup_obj_as_complex().
#define complex_dat_p | ( | x | ) | ((x)->flags & COMPLEX_DAT) |
Definition at line 163 of file date_core.c.
Referenced by d_lite_initialize_copy(), d_lite_marshal_load(), d_lite_memsize(), get_c_civil(), get_c_df(), get_c_jd(), get_c_time(), local_df(), local_jd(), and set_of().
#define copy_complex_to_simple | ( | obj, | |
x, | |||
y | |||
) |
Definition at line 417 of file date_core.c.
Referenced by datetime_to_date().
#define copy_simple_to_complex | ( | obj, | |
x, | |||
y | |||
) |
Definition at line 391 of file date_core.c.
Referenced by dup_obj_as_complex().
#define date_sg_t double |
Definition at line 228 of file date_core.c.
Referenced by set_sg().
#define DAY_IN_SECONDS 86400 |
Definition at line 176 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 1930 of file date_core.c.
Referenced by of2str().
#define DEFAULT_SG ITALY |
Definition at line 170 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 3684 of file date_core.c.
Referenced by rt_rewrite_frags().
#define del_hash0 | ( | k | ) | rb_hash_delete(hash, k) |
Definition at line 3680 of file date_core.c.
#define DIV | ( | n, | |
d | |||
) | ((n)<0 ? NDIV((n),(d)) : (n)/(d)) |
Definition at line 150 of file date_core.c.
Referenced by c_jd_to_commercial(), c_jd_to_wday(), c_jd_to_weeknum(), c_valid_weeknum_p(), d_lite_plus(), d_lite_rshift(), decode_year(), and vm_init_redefined_flag().
#define ENGLAND 2361222 /* 1752-09-14 */ |
Definition at line 167 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 209 of file date_core.c.
Referenced by d_lite_plus(), d_lite_to_s(), 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 210 of file date_core.c.
Referenced by d_lite_to_s(), date_to_datetime(), get_c_jd(), get_c_time(), get_s_jd(), and m_mday().
Definition at line 208 of file date_core.c.
Referenced by d_lite_plus(), d_lite_to_s(), get_c_civil(), get_c_df(), get_c_jd(), and m_min().
Definition at line 211 of file date_core.c.
Referenced by d_lite_to_s(), date_to_datetime(), get_c_jd(), get_c_time(), get_s_jd(), and m_mon().
Definition at line 207 of file date_core.c.
Referenced by d_lite_plus(), d_lite_to_s(), 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 30 of file date_core.c.
Referenced by f_divide(), f_format(), m_sin(), nucomp_abs(), nucomp_expt(), nucomp_polar(), and numeric_polar().
#define f_add | ( | x, | |
y | |||
) | rb_funcall(x, '+', 1, y) |
Definition at line 32 of file date_core.c.
Referenced by d_lite_plus(), datetime_to_time(), decode_year(), 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 51 of file date_core.c.
Referenced by d_lite_rshift().
#define f_ajd | ( | x | ) | rb_funcall(x, rb_intern("ajd"), 0) |
Definition at line 137 of file date_core.c.
Referenced by cmp_gen().
Definition at line 28 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 42 of file date_core.c.
#define f_div | ( | x, | |
y | |||
) | rb_funcall(x, '/', 1, y) |
Definition at line 35 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 40 of file date_core.c.
Referenced by nucomp_expt().
#define f_floor | ( | x | ) | rb_funcall(x, rb_intern("floor"), 0) |
Definition at line 41 of file date_core.c.
Referenced by d_lite_plus(), div_day(), and div_df().
#define f_hour | ( | x | ) | rb_funcall(x, rb_intern("hour"), 0) |
Definition at line 143 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 37 of file date_core.c.
Referenced by d_lite_plus(), d_lite_rshift(), d_trunc(), decode_jd(), decode_year(), h_trunc(), min_trunc(), nurat_coerce(), nurat_s_canonicalize_internal(), rt_rewrite_frags(), and s_trunc().
#define f_inspect | ( | x | ) | rb_funcall(x, rb_intern("inspect"), 0) |
Definition at line 49 of file date_core.c.
#define f_jd | ( | x | ) | rb_funcall(x, rb_intern("jd"), 0) |
Definition at line 138 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 8440 of file date_core.c.
Referenced by date_to_time().
#define f_mday | ( | x | ) | rb_funcall(x, rb_intern("mday"), 0) |
Definition at line 141 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 144 of file date_core.c.
Referenced by time_to_datetime().
#define f_mod | ( | x, | |
y | |||
) | rb_funcall(x, '%', 1, y) |
Definition at line 38 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 140 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 34 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(), Init_date_core(), m_ajd(), minus_dd(), sec_to_ms(), and sec_to_ns().
#define f_negate | ( | x | ) | rb_funcall(x, rb_intern("-@"), 0) |
Definition at line 31 of file date_core.c.
Referenced by d_lite_lshift(), d_lite_minus(), d_lite_plus(), f_complex_polar(), f_divide(), imp1(), m_sin(), nucomp_conj(), and nucomp_negate().
#define f_nonzero_p | ( | x | ) | (!f_zero_p(x)) |
Definition at line 125 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 135 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 36 of file date_core.c.
Referenced by f_reciprocal(), h_trunc(), 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 39 of file date_core.c.
#define f_round | ( | x | ) | rb_funcall(x, rb_intern("round"), 0) |
Definition at line 44 of file date_core.c.
Referenced by offset_to_sec(), and old_to_new().
#define f_sec | ( | x | ) | rb_funcall(x, rb_intern("sec"), 0) |
Definition at line 145 of file date_core.c.
Referenced by time_to_datetime().
#define f_sub | ( | x, | |
y | |||
) | rb_funcall(x, '-', 1, y) |
Definition at line 33 of file date_core.c.
Referenced by d_lite_ld(), d_lite_marshal_load(), d_lite_mjd(), d_lite_plus(), d_lite_rshift(), m_ajd(), m_amjd(), minus_dd(), rt__valid_date_frags_p(), rt_complete_frags(), and tmx_m_secs().
Definition at line 52 of file date_core.c.
#define f_subsec | ( | x | ) | rb_funcall(x, rb_intern("subsec"), 0) |
Definition at line 8438 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 46 of file date_core.c.
Referenced by nucomp_s_alloc(), nucomp_to_i(), nurat_int_value(), nurat_s_alloc(), and to_integer().
#define f_to_r | ( | x | ) | rb_funcall(x, rb_intern("to_r"), 0) |
Definition at line 47 of file date_core.c.
Referenced by d_lite_plus(), nucomp_to_r(), and offset_to_sec().
#define f_to_s | ( | x | ) | rb_funcall(x, rb_intern("to_s"), 0) |
Definition at line 48 of file date_core.c.
#define f_truncate | ( | x | ) | rb_funcall(x, rb_intern("truncate"), 0) |
Definition at line 43 of file date_core.c.
Referenced by nurat_coerce().
#define f_utc_offset | ( | x | ) | rb_funcall(x, rb_intern("utc_offset"), 0) |
Definition at line 8439 of file date_core.c.
Referenced by time_to_datetime().
#define f_wday | ( | x | ) | rb_funcall(x, rb_intern("wday"), 0) |
Definition at line 142 of file date_core.c.
#define f_year | ( | x | ) | rb_funcall(x, rb_intern("year"), 0) |
Definition at line 139 of file date_core.c.
Referenced by time_to_date(), and time_to_datetime().
#define GC_PERIOD0 146097 /* 365.2425 * 400 */ |
Definition at line 181 of file date_core.c.
#define get_d1 | ( | x | ) |
Definition at line 288 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_initialize_copy(), 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_to_s(), 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(), dup_obj_with_new_offset(), dup_obj_with_new_start(), equal_gen(), set_tmx(), time_to_date(), and time_to_datetime().
#define get_d1a | ( | x | ) |
Definition at line 292 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 296 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 300 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 169 of file date_core.c.
Referenced by d_lite_gregorian(), d_lite_marshal_load(), date_s_today(), date_s_valid_commercial_p(), datetime_s_now(), datetime_to_datetime(), Init_date_core(), time_to_date(), valid_civil_sub(), valid_commercial_sub(), valid_jd_sub(), and valid_ordinal_sub().
#define HALF_DAYS_IN_SECONDS (DAY_IN_SECONDS / 2) |
Definition at line 1558 of file date_core.c.
Referenced by m_ajd().
#define HAVE_CIVIL (1 << 2) |
Definition at line 155 of file date_core.c.
Referenced by canonicalize_c_jd(), canonicalize_s_jd(), clear_civil(), d_lite_plus(), d_lite_to_s(), 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 161 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 154 of file date_core.c.
Referenced by d_lite_marshal_load(), d_lite_plus(), d_lite_s_alloc_complex(), d_lite_to_s(), date_to_datetime(), datetime_to_date(), dt_new_by_frags(), dup_obj_as_complex(), get_c_df(), and old_to_new().
#define have_df_p | ( | x | ) | ((x)->flags & HAVE_DF) |
Definition at line 160 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 153 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_lite_to_s(), 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(), get_s_jd(), and old_to_new().
#define have_jd_p | ( | x | ) | ((x)->flags & HAVE_JD) |
Definition at line 159 of file date_core.c.
Referenced by canonicalize_c_jd(), canonicalize_s_jd(), d_complex_new_internal(), 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 156 of file date_core.c.
Referenced by clear_civil(), d_lite_plus(), d_lite_to_s(), 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 162 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 175 of file date_core.c.
Referenced by df_to_time(), rt_rewrite_frags(), and time_to_df().
Definition at line 201 of file date_core.c.
#define HOUR_WIDTH 5 |
Definition at line 195 of file date_core.c.
#define ITALY 2299161 /* 1582-10-15 */ |
Definition at line 166 of file date_core.c.
Referenced by d_lite_italy(), datetime_to_datetime(), and Init_date_core().
#define JC_PERIOD0 1461 /* 365.25 * 4 */ |
Definition at line 180 of file date_core.c.
#define jd_trunc d_trunc |
Definition at line 3155 of file date_core.c.
#define JULIAN positive_inf |
Definition at line 168 of file date_core.c.
Referenced by d_lite_julian(), d_lite_marshal_load(), and Init_date_core().
#define k_trunc d_trunc |
Definition at line 3156 of file date_core.c.
#define MDAY_SHIFT (HOUR_WIDTH + MIN_WIDTH + SEC_WIDTH) |
Definition at line 202 of file date_core.c.
#define MDAY_WIDTH 5 |
Definition at line 196 of file date_core.c.
#define MILLISECOND_IN_NANOSECONDS 1000000 |
Definition at line 6615 of file date_core.c.
Referenced by tmx_m_msecs().
#define MIN_SHIFT SEC_WIDTH |
Definition at line 200 of file date_core.c.
#define MIN_WIDTH 6 |
Definition at line 194 of file date_core.c.
#define MINUTE_IN_SECONDS 60 |
Definition at line 174 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 151 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_valid_weeknum_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 203 of file date_core.c.
#define MON_WIDTH 4 |
Definition at line 197 of file date_core.c.
#define NDEBUG |
Definition at line 14 of file date_core.c.
#define NDIV | ( | x, | |
y | |||
) | (-(-((x)+1)/(y))-1) |
Definition at line 148 of file date_core.c.
#define NMOD | ( | x, | |
y | |||
) | ((y)-(-((x)+1)%(y))-1) |
Definition at line 149 of file date_core.c.
#define num2int_with_frac | ( | s, | |
n | |||
) |
Definition at line 3219 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 3209 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 217 of file date_core.c.
Referenced by get_s_civil().
#define PACK5 | ( | m, | |
d, | |||
h, | |||
min, | |||
s | |||
) |
Definition at line 213 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 205 of file date_core.c.
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by cmp_gen(), datetime_to_time(), equal_gen(), f_eqeq_p(), f_ge_p(), and Init_date_core().
#define ref_hash | ( | k | ) | rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
Definition at line 3683 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 3679 of file date_core.c.
Referenced by rt_complete_frags().
#define REFORM_BEGIN_JD 2298874 /* ns 1582-01-01 */ |
Definition at line 189 of file date_core.c.
#define REFORM_BEGIN_YEAR 1582 |
Definition at line 187 of file date_core.c.
Referenced by guess_style().
#define REFORM_END_JD 2426355 /* os 1930-12-31 */ |
Definition at line 190 of file date_core.c.
Referenced by c_valid_start_p().
#define REFORM_END_YEAR 1930 |
Definition at line 188 of file date_core.c.
Referenced by guess_style().
#define SEC_SHIFT 0 |
Definition at line 199 of file date_core.c.
#define SEC_WIDTH 6 |
Definition at line 193 of file date_core.c.
#define SECOND_IN_MILLISECONDS 1000 |
Definition at line 177 of file date_core.c.
Referenced by ns_to_day(), and sec_to_ms().
#define SECOND_IN_NANOSECONDS 1000000000 |
Definition at line 178 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().
#define set_hash | ( | k, | |
v | |||
) | rb_hash_aset(hash, ID2SYM(rb_intern(k)), v) |
Definition at line 3682 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 3678 of file date_core.c.
Referenced by rt_complete_frags().
#define set_to_complex | ( | obj, | |
x, | |||
_nth, | |||
_jd, | |||
_df, | |||
_sf, | |||
_of, | |||
_sg, | |||
_year, | |||
_mon, | |||
_mday, | |||
_hour, | |||
_min, | |||
_sec, | |||
_flags | |||
) |
Definition at line 358 of file date_core.c.
Referenced by d_complex_new_internal(), and d_lite_marshal_load().
#define set_to_simple | ( | obj, | |
x, | |||
_nth, | |||
_jd, | |||
_sg, | |||
_year, | |||
_mon, | |||
_mday, | |||
_flags | |||
) |
Definition at line 328 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 164 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(), d_lite_to_s(), 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_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 6563 of file date_core.c.
Referenced by date_strftime_alloc(), date_strftime_internal(), and strftimev().
Definition at line 3721 of file date_core.c.
Referenced by console_dev(), cv_list_i(), dsymbol_check(), exec_recursive(), fole_missing(), Init_sym(), iseq_build_from_ary_body(), iseq_build_kw(), list_i(), lookup_str_sym(), m_core_define_method(), m_core_define_singleton_method(), r_ivar(), r_symlink(), r_symreal(), rb_call_inits(), rb_check_symbol(), rb_check_symbol_cstr(), rb_f_global_variables(), rb_f_send(), rb_fiddle_ptr_initialize(), rb_fiddle_ptr_s_malloc(), rb_id_attrset(), rb_intern3(), rb_str_format(), rb_str_intern(), rb_sym_proc_call(), rb_sym_to_proc(), rb_threadptr_pending_interrupt_check_mask(), register_label(), rt_complete_frags(), struct_make_members_list(), sym_to_sym(), symbol2event_flag(), tracepoint_inspect(), vm_call_opt_send(), and w_symbol().
#define UNIX_EPOCH_IN_CJD INT2FIX(2440588) /* 1970-01-01 */ |
Definition at line 172 of file date_core.c.
Referenced by rt_rewrite_frags(), and tmx_m_secs().
#define USE_PACK |
Definition at line 21 of file date_core.c.
Referenced by d_lite_plus(), and d_lite_to_s().
#define val2off | ( | vof, | |
iof | |||
) |
Definition at line 4693 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 3243 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 2422 of file date_core.c.
Referenced by date_s_valid_commercial_p(), valid_civil_sub(), valid_commercial_sub(), valid_jd_sub(), and valid_ordinal_sub().
anonymous enum |
Enumerator | |
---|---|
DECIMAL_SIZE_OF_LONG | |
JISX0301_DATE_SIZE |
Definition at line 6997 of file date_core.c.
|
static |
Definition at line 480 of file date_core.c.
References SimpleDateData::jd.
Referenced by c_valid_civil_p(), d_lite_leap_p(), datetime_to_datetime(), expect_numeric(), get_c_jd(), get_s_jd(), and valid_civil_p().
|
static |
Definition at line 554 of file date_core.c.
References c_find_fdoy(), MOD, and SimpleDateData::sg.
Referenced by c_jd_to_commercial(), c_valid_commercial_p(), datetime_to_datetime(), and expect_numeric().
|
static |
Definition at line 434 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 469 of file date_core.c.
References c_valid_civil_p().
Referenced by c_jd_to_weeknum(), and c_valid_civil_p().
|
static |
Definition at line 445 of file date_core.c.
References c_valid_civil_p(), and SimpleDateData::sg.
Referenced by c_valid_ordinal_p().
|
static |
Definition at line 697 of file date_core.c.
References assert, c_gregorian_leap_p(), and monthtab.
Referenced by c_valid_gregorian_p().
|
inlinestatic |
Definition at line 684 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 1784 of file date_core.c.
References assert, c_gregorian_leap_p(), and yeartab.
Referenced by m_yday().
|
static |
Definition at line 504 of file date_core.c.
References SimpleDateData::jd.
Referenced by c_jd_to_commercial(), c_jd_to_ordinal(), c_jd_to_wday(), c_jd_to_weeknum(), c_valid_civil_p(), d_lite_leap_p(), datetime_to_datetime(), expect_numeric(), get_c_civil(), and get_s_civil().
|
static |
Definition at line 568 of file date_core.c.
References c_commercial_to_jd(), c_jd_to_civil(), DIV, and MOD.
Referenced by c_valid_commercial_p(), datetime_to_datetime(), expect_numeric(), m_cweek(), and m_cwyear().
|
static |
Definition at line 544 of file date_core.c.
References c_find_fdoy(), and c_jd_to_civil().
Referenced by c_valid_ordinal_p(), datetime_to_datetime(), expect_numeric(), and m_yday().
|
inlinestatic |
Definition at line 631 of file date_core.c.
References c_jd_to_civil(), DIV, SimpleDateData::jd, MOD, and SimpleDateData::sg.
Referenced by m_wday().
|
static |
Definition at line 599 of file date_core.c.
References c_find_fdoy(), c_find_ldom(), c_jd_to_civil(), DIV, MOD, and SimpleDateData::sg.
Referenced by c_valid_weeknum_p(), datetime_to_datetime(), expect_numeric(), and m_wnumx().
|
static |
Definition at line 690 of file date_core.c.
References assert, c_julian_leap_p(), and monthtab.
Referenced by c_valid_julian_p().
|
inlinestatic |
Definition at line 678 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 1777 of file date_core.c.
References assert, c_julian_leap_p(), and yeartab.
Referenced by m_yday().
|
static |
Definition at line 534 of file date_core.c.
References c_find_fdoy(), and SimpleDateData::sg.
Referenced by c_valid_ordinal_p(), datetime_to_datetime(), and expect_numeric().
|
static |
Definition at line 742 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 765 of file date_core.c.
References c_commercial_to_jd(), and c_jd_to_commercial().
Referenced by valid_commercial_p().
|
static |
Definition at line 723 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 704 of file date_core.c.
References c_julian_last_day_of_month(), and last.
Referenced by valid_civil_p().
|
static |
Definition at line 650 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 861 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 843 of file date_core.c.
Referenced by datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_ordinal(), and dt_new_by_frags().
|
static |
Definition at line 789 of file date_core.c.
References c_jd_to_weeknum(), c_weeknum_to_jd(), DIV, MOD, and SimpleDateData::sg.
Referenced by valid_weeknum_p().
|
inlinestatic |
Definition at line 1091 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 588 of file date_core.c.
References c_find_fdoy(), MOD, and SimpleDateData::sg.
Referenced by c_valid_weeknum_p(), datetime_to_datetime(), and expect_numeric().
Definition at line 306 of file date_core.c.
References FIX2LONG, FIXNUM_P, rb_rational_den(), rb_rational_num(), RB_TYPE_P, and T_RATIONAL.
Definition at line 1220 of file date_core.c.
References assert, DateData::c, canonicalize_jd, DateData::flags, HAVE_CIVIL, have_jd_p, ComplexDateData::jd, SimpleDateData::nth, ComplexDateData::nth, and RB_OBJ_WRITE.
Referenced by m_canonicalize_jd().
Definition at line 1124 of file date_core.c.
References assert, canonicalize_jd, DateData::flags, HAVE_CIVIL, have_jd_p, SimpleDateData::jd, SimpleDateData::nth, RB_OBJ_WRITE, and DateData::s.
Referenced by m_canonicalize_jd().
|
static |
Definition at line 5326 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 6251 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 6239 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 2979 of file date_core.c.
References assert, COMPLEX_DAT, d_lite_type, have_civil_p, have_df_p, have_jd_p, have_time_p, set_to_complex, and TypedData_Make_Struct.
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(), old_to_new(), and time_to_datetime().
Definition at line 4819 of file date_core.c.
References get_d1, and m_ajd().
Referenced by Init_date_core().
Definition at line 4836 of file date_core.c.
References get_d1, and m_amjd().
Referenced by Init_date_core().
Definition at line 6940 of file date_core.c.
References strftimev().
Referenced by Init_date_core().
Definition at line 6324 of file date_core.c.
References cmp_dd(), cmp_gen(), f_eqeq_p(), f_lt_p(), get_d2, INT2FIX, k_date_p(), m_canonicalize_jd(), m_gregorian_p(), m_jd(), m_nth(), and simple_dat_p.
Referenced by d_lite_downto(), d_lite_eql_p(), d_lite_prev_year(), d_lite_step(), and d_lite_upto().
Definition at line 5012 of file date_core.c.
References get_d1, INT2FIX, m_cwday(), m_wnum0(), and m_wnum1().
Referenced by Init_date_core().
Definition at line 4997 of file date_core.c.
References get_d1, INT2FIX, and m_cweek().
Referenced by Init_date_core().
Definition at line 4982 of file date_core.c.
References get_d1, and m_real_cwyear().
Referenced by Init_date_core().
Definition at line 4964 of file date_core.c.
References get_d1, INT2FIX, m_fr(), and simple_dat_p.
Referenced by Init_date_core().
Definition at line 6224 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 5422 of file date_core.c.
References dup_obj_with_new_start(), and ENGLAND.
Referenced by Init_date_core().
Definition at line 6428 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 6397 of file date_core.c.
References equal_gen(), f_eqeq_p(), get_d2, k_date_p(), m_canonicalize_jd(), m_gregorian_p(), m_local_jd(), m_nth(), Qfalse, and Qtrue.
Referenced by Init_date_core().
Definition at line 5121 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
|
static |
Definition at line 2934 of file date_core.c.
References DateData::c, SimpleDateData::nth, ComplexDateData::nth, rb_gc_mark(), DateData::s, ComplexDateData::sf, and simple_dat_p.
Definition at line 5446 of file date_core.c.
References dup_obj_with_new_start(), and GREGORIAN.
Referenced by Init_date_core().
Definition at line 5279 of file date_core.c.
References f_boolcast, get_d1, and m_gregorian_p().
Referenced by Init_date_core().
Definition at line 6437 of file date_core.c.
References get_d1, m_df(), m_jd(), m_nth(), m_sf(), rb_memhash(), set_tmx(), ST2FIX, and strftimev().
Referenced by Init_date_core().
Definition at line 5169 of file date_core.c.
References get_d1, INT2FIX, and m_hour().
Referenced by Init_date_core().
Definition at line 6991 of file date_core.c.
References dup_obj_with_new_offset(), and strftimev().
Referenced by Init_date_core().
Definition at line 4763 of file date_core.c.
References COMPLEX_DAT, complex_dat_p, get_c_civil(), get_c_df(), get_c_jd(), get_c_time(), get_d1, get_d2, get_s_civil(), get_s_jd(), rb_check_frozen, rb_check_trusted(), rb_eArgError, rb_raise(), and simple_dat_p.
Referenced by Init_date_core().
Definition at line 6551 of file date_core.c.
References date_strftime(), get_d1, mk_inspect(), and rb_obj_class().
Referenced by Init_date_core().
Definition at line 6953 of file date_core.c.
References strftimev().
Referenced by Init_date_core().
Definition at line 5410 of file date_core.c.
References dup_obj_with_new_start(), and ITALY.
Referenced by Init_date_core().
Definition at line 4853 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 7042 of file date_core.c.
References DBL2NUM, FL_EXIVAR, FL_SET, FL_TEST, get_d1, jisx0301_date_format(), JISX0301_DATE_SIZE, m_ajd(), m_of_in_day(), m_real_local_jd(), m_real_year(), m_sg(), rb_ary_new3, rb_copy_generic_ivar(), and strftimev().
Referenced by dt_lite_jisx0301(), and Init_date_core().
Definition at line 5434 of file date_core.c.
References dup_obj_with_new_start(), and JULIAN.
Referenced by Init_date_core().
Definition at line 5263 of file date_core.c.
References f_boolcast, get_d1, and m_julian_p().
Referenced by Init_date_core().
Definition at line 4886 of file date_core.c.
References f_sub, get_d1, INT2FIX, and m_real_local_jd().
Referenced by Init_date_core().
Definition at line 5295 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 6050 of file date_core.c.
References d_lite_rshift(), expect_numeric(), and f_negate.
Referenced by d_lite_prev_month(), d_lite_prev_year(), and Init_date_core().
Definition at line 7078 of file date_core.c.
References 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 7102 of file date_core.c.
References DateData::c, COMPLEX_DAT, complex_dat_p, DBL2NUM, f_sub, f_zero_p(), FL_EXIVAR, FL_SET, FL_TEST, get_d1, GREGORIAN, half_days_in_day, HAVE_DF, HAVE_JD, INT2FIX, SimpleDateData::jd, JULIAN, k_numeric_p(), SimpleDateData::nth, NUM2DBL, NUM2INT, old_to_new(), RARRAY_AREF, RARRAY_LEN, rb_check_frozen, rb_check_trusted(), rb_copy_generic_ivar(), rb_eArgError, rb_eTypeError, rb_raise(), RB_TYPE_P, RTEST, DateData::s, set_to_complex, set_to_simple, SimpleDateData::sg, and T_ARRAY.
Referenced by date_s__load(), and Init_date_core().
Definition at line 4949 of file date_core.c.
References get_d1, INT2FIX, and m_mday().
Referenced by Init_date_core().
|
static |
Definition at line 2946 of file date_core.c.
References complex_dat_p.
Definition at line 5185 of file date_core.c.
References get_d1, INT2FIX, and m_min().
Referenced by Init_date_core().
Definition at line 5898 of file date_core.c.
References d_lite_plus(), DBL2NUM, expect_numeric(), f_negate, FIX2LONG, k_date_p(), LONG2NUM, minus_dd(), 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 4870 of file date_core.c.
References f_sub, get_d1, INT2FIX, and m_real_local_jd().
Referenced by Init_date_core().
Definition at line 4933 of file date_core.c.
References get_d1, INT2FIX, and m_mon().
Referenced by Init_date_core().
Definition at line 5069 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 5483 of file date_core.c.
References dup_obj_with_new_offset(), rb_scan_args(), and val2off.
Referenced by Init_date_core().
Definition at line 5389 of file date_core.c.
References DEFAULT_SG, dup_obj_with_new_start(), rb_scan_args(), SimpleDateData::sg, and val2sg.
Referenced by Init_date_core().
Definition at line 5959 of file date_core.c.
References d_lite_next_day(), and NULL.
Referenced by Init_date_core().
Definition at line 5924 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 6065 of file date_core.c.
References d_lite_rshift(), INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 6107 of file date_core.c.
References d_lite_rshift(), f_mul, INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 5232 of file date_core.c.
References get_d1, and m_of_in_day().
Referenced by Init_date_core().
Definition at line 5514 of file date_core.c.
References DateData::c, canonicalize_jd, CM_PERIOD, COMPLEX_DAT, d_complex_new_internal(), d_simple_new_internal(), DAY_IN_SECONDS, DBL2NUM, ComplexDateData::df, DIV, EX_HOUR, EX_MIN, EX_SEC, expect_numeric(), f, 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, SimpleDateData::flags, ComplexDateData::flags, get_d1, HAVE_CIVIL, HAVE_DF, HAVE_JD, HAVE_TIME, INT2FIX, SimpleDateData::jd, k_rational_p(), m_df(), m_jd(), m_nth(), m_of(), m_sf(), m_sg(), MOD, SimpleDateData::nth, ComplexDateData::of, ComplexDateData::pc, rb_obj_class(), rb_rational_num(), RFLOAT_VALUE, round(), DateData::s, SECOND_IN_NANOSECONDS, ComplexDateData::sf, SimpleDateData::sg, ComplexDateData::sg, 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 5941 of file date_core.c.
References d_lite_minus(), INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 6084 of file date_core.c.
References d_lite_lshift(), INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 6130 of file date_core.c.
References d_lite_cmp(), d_lite_lshift(), f_mul, INT2FIX, and rb_scan_args().
Referenced by Init_date_core().
Definition at line 6978 of file date_core.c.
References strftimev().
Referenced by Init_date_core().
Definition at line 6965 of file date_core.c.
References strftimev().
Referenced by Init_date_core().
Definition at line 5988 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, SimpleDateData::nth, rb_eArgError, rb_raise(), SimpleDateData::sg, and valid_civil_p().
Referenced by d_lite_lshift(), d_lite_next_month(), d_lite_next_year(), and Init_date_core().
Definition at line 3024 of file date_core.c.
References d_lite_s_alloc_complex().
Referenced by date_s__load(), and Init_date_core().
Definition at line 3012 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 3002 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 5134 of file date_core.c.
References f_boolcast, get_d1, m_local_jd(), m_mon(), m_virtual_sg(), m_wday(), m_year(), NUM2INT, Qfalse, and Qtrue.
Referenced by Init_date_core().
Definition at line 5201 of file date_core.c.
References get_d1, INT2FIX, and m_sec().
Referenced by Init_date_core().
Definition at line 5217 of file date_core.c.
References get_d1, and m_sf_in_sec().
Referenced by Init_date_core().
Definition at line 5319 of file date_core.c.
References DBL2NUM, get_d1, and m_sg().
Referenced by Init_date_core().
Definition at line 6154 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 6906 of file date_core.c.
References date_strftime_internal().
Referenced by Init_date_core().
Definition at line 5056 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 5108 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 6465 of file date_core.c.
References DateData::c, COMPLEX_DAT, ComplexDateData::df, EX_HOUR, EX_MDAY, EX_MIN, EX_MON, EX_SEC, SimpleDateData::flags, DateData::flags, get_d1, HAVE_CIVIL, HAVE_DF, HAVE_JD, HAVE_TIME, SimpleDateData::jd, ComplexDateData::jd, SimpleDateData::nth, ComplexDateData::nth, ComplexDateData::of, SimpleDateData::pc, ComplexDateData::pc, PRIsVALUE, rb_enc_sprintf(), rb_obj_class(), rb_usascii_encoding(), DateData::s, ComplexDateData::sf, SimpleDateData::sg, ComplexDateData::sg, simple_dat_p, strftimev(), USE_PACK, SimpleDateData::year, and ComplexDateData::year.
Referenced by Init_date_core().
Definition at line 5082 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 6202 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 5043 of file date_core.c.
References get_d1, INT2FIX, and m_wday().
Referenced by Init_date_core(), and rt_complete_frags().
Definition at line 5095 of file date_core.c.
References f_boolcast, get_d1, and m_wday().
Referenced by Init_date_core().
Definition at line 4917 of file date_core.c.
References get_d1, INT2FIX, and m_yday().
Referenced by Init_date_core().
Definition at line 4902 of file date_core.c.
References get_d1, and m_real_year().
Referenced by Init_date_core(), and rt_complete_frags().
Definition at line 5247 of file date_core.c.
References get_d1, and m_zone().
Referenced by Init_date_core().
Definition at line 4133 of file date_core.c.
References c_valid_start_p(), d_simple_new_internal(), date__strptime(), decode_jd(), DEFAULT_SG, hash(), HAVE_JD, INT2FIX, SimpleDateData::jd, NIL_P, SimpleDateData::nth, 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 2960 of file date_core.c.
References assert, COMPLEX_DAT, d_lite_type, have_civil_p, have_jd_p, set_to_simple, and TypedData_Make_Struct.
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(), old_to_new(), and time_to_date().
Definition at line 3140 of file date_core.c.
References f_idiv, f_mod, INT2FIX, to_integer(), and wholenum_p().
Definition at line 2903 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(), and date_s_parse().
Definition at line 2470 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(), date_s__iso8601(), and date_s_parse().
Definition at line 2977 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(), and date_s_parse().
Definition at line 2049 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, f_negate, 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(), and date_s_strptime().
Definition at line 2757 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(), and date_s_parse().
Definition at line 2538 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(), and date_s_parse().
Definition at line 653 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 d_new_by_frags(), and date_s__strptime_internal().
Definition at line 2684 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(), and date_s_parse().
Definition at line 4565 of file date_core.c.
References date__httpdate().
Referenced by date_s_httpdate(), datetime_s_httpdate(), and Init_date_core().
Definition at line 4396 of file date_core.c.
References date__iso8601().
Referenced by date_s_iso8601(), datetime_s_iso8601(), and Init_date_core().
Definition at line 4607 of file date_core.c.
References date__jisx0301().
Referenced by date_s_jisx0301(), datetime_s_jisx0301(), and Init_date_core().
Definition at line 7190 of file date_core.c.
References d_lite_marshal_load(), d_lite_s_alloc(), and rb_marshal_load().
Referenced by Init_date_core().
Definition at line 4336 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 4294 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 4522 of file date_core.c.
References date__rfc2822().
Referenced by date_s_rfc2822(), datetime_s_rfc2822(), and Init_date_core().
Definition at line 4439 of file date_core.c.
References date__rfc3339().
Referenced by date_s_rfc3339(), datetime_s_rfc3339(), and Init_date_core().
Definition at line 4242 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 4178 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 4480 of file date_core.c.
References date__xmlschema().
Referenced by date_s_xmlschema(), datetime_s_xmlschema(), and Init_date_core().
Definition at line 3386 of file date_core.c.
References add_frac, d_simple_new_internal(), DEFAULT_SG, guess_style(), HAVE_CIVIL, HAVE_JD, INT2FIX, SimpleDateData::nth, NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), SimpleDateData::sg, val2sg, valid_civil_p(), and valid_gregorian_p().
Referenced by Init_date_core().
Definition at line 3463 of file date_core.c.
References add_frac, d_simple_new_internal(), DEFAULT_SG, f, HAVE_JD, INT2FIX, SimpleDateData::nth, NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), SimpleDateData::sg, val2sg, valid_commercial_p(), and valid_weeknum_p().
Referenced by Init_date_core().
Definition at line 2924 of file date_core.c.
References c_gregorian_leap_p(), decode_year(), f_boolcast, and SimpleDateData::nth.
Referenced by Init_date_core().
Definition at line 4581 of file date_core.c.
References d_new_by_frags(), date_s__httpdate(), DEFAULT_SG, INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 4413 of file date_core.c.
References d_new_by_frags(), date_s__iso8601(), DEFAULT_SG, INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 3268 of file date_core.c.
References add_frac, d_simple_new_internal(), decode_jd(), DEFAULT_SG, HAVE_JD, INT2FIX, SimpleDateData::jd, SimpleDateData::nth, num2num_with_frac, positive_inf, rb_scan_args(), SimpleDateData::sg, and val2sg.
Referenced by Init_date_core().
Definition at line 4622 of file date_core.c.
References d_new_by_frags(), date_s__jisx0301(), DEFAULT_SG, INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 2903 of file date_core.c.
References c_julian_leap_p(), decode_year(), f_boolcast, and SimpleDateData::nth.
Referenced by Init_date_core().
Definition at line 3318 of file date_core.c.
References add_frac, d_simple_new_internal(), DEFAULT_SG, HAVE_JD, INT2FIX, SimpleDateData::nth, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), SimpleDateData::sg, val2sg, and valid_ordinal_p().
Referenced by Init_date_core().
Definition at line 4357 of file date_core.c.
References d_new_by_frags(), date__httpdate(), date__iso8601(), date__jisx0301(), date__rfc2822(), date__rfc3339(), date__xmlschema(), date_s__parse(), DEFAULT_SG, hash(), INT2FIX, Qtrue, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 4539 of file date_core.c.
References d_new_by_frags(), date_s__rfc2822(), DEFAULT_SG, INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 4454 of file date_core.c.
References d_new_by_frags(), date_s__rfc3339(), DEFAULT_SG, INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 4266 of file date_core.c.
References d_new_by_frags(), date__parse(), date_s__strptime(), DEFAULT_SG, hash(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 3639 of file date_core.c.
References d_simple_new_internal(), decode_year(), DEFAULT_SG, get_d1, GREGORIAN, HAVE_CIVIL, INT2FIX, localtime_r(), SimpleDateData::nth, rb_scan_args(), rb_sys_fail(), set_sg(), SimpleDateData::sg, and val2sg.
Referenced by Init_date_core(), and rt_complete_frags().
Definition at line 2557 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 2720 of file date_core.c.
References argc, argv, date_zone_to_diff(), DBL2NUM, DEFAULT_SG, encode_jd(), f, GREGORIAN, INT2FIX, NIL_P, SimpleDateData::nth, NUM2DBL, NUM2INT, Qfalse, Qnil, Qtrue, rb_scan_args(), SimpleDateData::sg, valid_commercial_sub(), valid_sg, and valid_weeknum_p().
Referenced by Init_date_core().
Definition at line 2468 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 2638 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 4495 of file date_core.c.
References d_new_by_frags(), date_s__xmlschema(), DEFAULT_SG, INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 628 of file date_strftime.c.
References date_strftime_with_tmx().
Referenced by d_lite_inspect(), and date_strftime_alloc().
Definition at line 6565 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 6673 of file date_core.c.
References buf, date_strftime_alloc(), len, OBJ_INFECT, 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 8549 of file date_core.c.
Referenced by Init_date_core().
Definition at line 8561 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, RB_OBJ_WRITE, and simple_dat_p.
Referenced by Init_date_core().
Definition at line 8532 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 353 of file date_parse.c.
Referenced by date_s_valid_commercial_p(), offset_to_sec(), and valid_weeknum_p().
Definition at line 7870 of file date_core.c.
References date_s__strptime_internal().
Referenced by Init_date_core().
Definition at line 7358 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(), SimpleDateData::nth, NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), SimpleDateData::sg, time_to_df(), val2off, val2sg, valid_civil_p(), and valid_gregorian_p().
Referenced by Init_date_core().
Definition at line 7455 of file date_core.c.
References add_frac, c_valid_time_p(), canon24oc, d_complex_new_internal(), DEFAULT_SG, f, HAVE_JD, HAVE_TIME, INT2FIX, jd_local_to_utc(), SimpleDateData::nth, NUM2INT, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), SimpleDateData::sg, time_to_df(), val2off, val2sg, valid_commercial_p(), and valid_weeknum_p().
Referenced by Init_date_core().
Definition at line 8107 of file date_core.c.
References date_s__httpdate(), DEFAULT_SG, dt_new_by_frags(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 7986 of file date_core.c.
References date_s__iso8601(), DEFAULT_SG, dt_new_by_frags(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 7214 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, SimpleDateData::jd, jd_local_to_utc(), SimpleDateData::nth, num2int_with_frac, num2num_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), SimpleDateData::sg, time_to_df(), val2off, and val2sg.
Referenced by Init_date_core().
Definition at line 8137 of file date_core.c.
References date_s__jisx0301(), DEFAULT_SG, dt_new_by_frags(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 7669 of file date_core.c.
References clock_gettime(), CLOCK_REALTIME, d_complex_new_internal(), DAY_IN_SECONDS, decode_year(), DEFAULT_SG, get_d1, gettimeofday(), gmtime_r(), GREGORIAN, HAVE_CIVIL, HAVE_TIME, INT2FIX, localtime_r(), LONG2NUM, SimpleDateData::nth, NULL, NUM2DBL, rb_scan_args(), rb_sys_fail(), rb_warning(), set_sg(), SimpleDateData::sg, timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, and timeval::tv_usec.
Referenced by Init_date_core().
Definition at line 7282 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(), SimpleDateData::nth, num2int_with_frac, positive_inf, rb_eArgError, rb_raise(), rb_scan_args(), SimpleDateData::sg, time_to_df(), val2off, val2sg, and valid_ordinal_p().
Referenced by Init_date_core().
Definition at line 7946 of file date_core.c.
References date_s__parse(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, Qtrue, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 8077 of file date_core.c.
References date_s__rfc2822(), DEFAULT_SG, dt_new_by_frags(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 8016 of file date_core.c.
References date_s__rfc3339(), DEFAULT_SG, dt_new_by_frags(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 7903 of file date_core.c.
References date_s__strptime(), DEFAULT_SG, dt_new_by_frags(), hash(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 8046 of file date_core.c.
References date_s__xmlschema(), DEFAULT_SG, dt_new_by_frags(), INT2FIX, rb_scan_args(), rb_str_new2, and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 8631 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 8663 of file date_core.c.
References c_civil_to_jd(), c_commercial_to_jd(), c_jd_to_civil(), c_jd_to_commercial(), c_jd_to_ordinal(), c_jd_to_weeknum(), c_ordinal_to_jd(), c_weeknum_to_jd(), day_to_sec(), f, f_eqeq_p(), GREGORIAN, INT2FIX, INT2NUM, ITALY, ns_to_day(), ns_to_sec(), Qfalse, Qtrue, rb_rational_new2, sec_to_day(), sec_to_ms(), sec_to_ns(), and SimpleDateData::sg.
Referenced by Init_date_core().
Definition at line 8601 of file date_core.c.
References dup_obj(), f_add, get_d1, INT2FIX, m_hour(), m_mday(), m_min(), m_mon(), m_of(), m_real_year(), m_sec(), m_sf_in_sec(), rb_cTime, rb_funcall(), and rb_intern.
Referenced by Init_date_core().
Definition at line 999 of file date_core.c.
References day_in_nanoseconds, DAY_IN_SECONDS, f_mul, FIX2LONG, INT2FIX, LONG2FIX, and safe_mul_p().
Referenced by datetime_to_datetime(), div_df(), offset_to_sec(), old_to_new(), and tmx_m_secs().
Definition at line 1069 of file date_core.c.
References div_day(), div_df(), f, and sec_to_ns().
Referenced by old_to_new().
Definition at line 1361 of file date_core.c.
References CM_PERIOD, f_idiv, f_mod, f_zero_p(), FIX2INT, and INT2FIX.
Referenced by d_new_by_frags(), date_s_jd(), datetime_s_jd(), dt_new_by_frags(), expect_numeric(), old_to_new(), valid_civil_p(), valid_commercial_p(), valid_ordinal_p(), and valid_weeknum_p().
Definition at line 1310 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(), expect_numeric(), 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 873 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 923 of file date_core.c.
References HOUR_IN_SECONDS, and MINUTE_IN_SECONDS.
Referenced by get_c_time().
|
inlinestatic |
Definition at line 884 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 1039 of file date_core.c.
References f_floor, f_mod, and INT2FIX.
Referenced by decode_day().
Definition at line 1047 of file date_core.c.
References day_to_sec(), f, f_floor, f_mod, INT2FIX, and sec_to_ns().
Referenced by decode_day().
Definition at line 8385 of file date_core.c.
References iso8601_timediv(), NUM2LONG, rb_check_arity, rb_str_append(), and strftimev().
Referenced by dt_lite_rfc3339(), and Init_date_core().
Definition at line 8424 of file date_core.c.
References d_lite_jisx0301(), iso8601_timediv(), NUM2LONG, rb_check_arity, and rb_str_append().
Referenced by Init_date_core().
Definition at line 8408 of file date_core.c.
References dt_lite_iso8601().
Referenced by Init_date_core().
Definition at line 8351 of file date_core.c.
References date_strftime_internal().
Referenced by Init_date_core().
Definition at line 8167 of file date_core.c.
References strftimev().
Referenced by Init_date_core().
Definition at line 7773 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_eqeq_p(), HAVE_DF, HAVE_JD, INT2FIX, SimpleDateData::jd, jd_local_to_utc(), NIL_P, SimpleDateData::nth, 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 4642 of file date_core.c.
References d_lite_s_alloc_complex(), d_lite_s_alloc_simple(), get_d1a, get_d1b, Qundef, rb_obj_class(), RB_OBJ_WRITTEN, and simple_dat_p.
Referenced by datetime_to_time(), and dup_obj_with_new_start().
Definition at line 4668 of file date_core.c.
References COMPLEX_DAT, copy_simple_to_complex, d_lite_s_alloc_complex(), get_d1a, get_d1b, HAVE_DF, Qundef, rb_obj_class(), RB_OBJ_WRITTEN, and simple_dat_p.
Referenced by dup_obj_with_new_offset().
Definition at line 5462 of file date_core.c.
References dup_obj_as_complex(), get_d1, and set_of().
Referenced by d_lite_httpdate(), and d_lite_new_offset().
Definition at line 5369 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 1372 of file date_core.c.
References CM_PERIOD, f_add, f_mul, f_zero_p(), and INT2FIX.
Referenced by d_lite_rshift(), date_s_valid_commercial_p(), 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 1342 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 6368 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().
|
inlinestatic |
Definition at line 1981 of file date_core.c.
References c_civil_to_jd(), c_commercial_to_jd(), c_jd_to_civil(), c_jd_to_commercial(), c_jd_to_ordinal(), c_jd_to_weeknum(), c_ordinal_to_jd(), c_weeknum_to_jd(), decode_jd(), decode_year(), f, f_zero_p(), FIX2INT, guess_style(), INT2FIX, SimpleDateData::jd, k_numeric_p(), SimpleDateData::nth, rb_eTypeError, rb_raise(), and SimpleDateData::sg.
Referenced by d_lite_lshift(), d_lite_minus(), d_lite_plus(), and offset_to_sec().
Definition at line 55 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 101 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(), datetime_to_datetime(), dt_new_by_frags(), equal_gen(), nucomp_eqeq_p(), nucomp_eql_p(), offset_to_sec(), old_to_new(), and rt__valid_date_frags_p().
Definition at line 93 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 77 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, and rb_funcall().
Referenced by rt_complete_frags().
Definition at line 1957 of file date_core.c.
References rb_obj_is_kind_of().
Referenced by k_date_p(), k_numeric_p(), and k_rational_p().
Definition at line 85 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 69 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, and rb_funcall().
Referenced by cmp_dd(), d_lite_cmp(), d_lite_plus(), minus_dd(), and old_to_new().
Definition at line 128 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, INT2FIX, and rb_funcall().
Referenced by c_virtual_sg(), f_signbit(), and s_virtual_sg().
Definition at line 109 of file date_core.c.
References f_boolcast, FIX2LONG, FIXNUM_P, id_eqeq_p, INT2FIX, Qfalse, rb_funcall(), rb_rational_num(), 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(), expect_numeric(), m_real_cwyear(), m_real_year(), minus_dd(), old_to_new(), 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 1264 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, SimpleDateData::jd, ComplexDateData::jd, jd_utc_to_local(), ComplexDateData::of, PACK5, ComplexDateData::pc, and ComplexDateData::year.
Referenced by d_lite_initialize_copy(), m_mday(), m_mon(), m_nth(), and m_year().
|
inlinestatic |
Definition at line 1176 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 d_lite_initialize_copy(), get_c_civil(), m_df(), m_local_df(), m_local_jd(), set_of(), and set_sg().
|
inlinestatic |
Definition at line 1232 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, SimpleDateData::jd, ComplexDateData::jd, jd_local_to_utc(), ComplexDateData::of, ComplexDateData::pc, time_to_df(), and ComplexDateData::year.
Referenced by d_lite_initialize_copy(), m_canonicalize_jd(), m_jd(), m_julian_p(), m_local_jd(), m_of(), m_sg(), set_of(), and set_sg().
|
inlinestatic |
Definition at line 1195 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, ComplexDateData::of, PACK5, and ComplexDateData::pc.
Referenced by d_lite_initialize_copy(), get_c_jd(), m_hour(), m_min(), and m_sec().
|
inlinestatic |
Definition at line 1156 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.
Referenced by d_lite_initialize_copy(), m_mday(), m_mon(), and m_year().
|
inlinestatic |
Definition at line 1136 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, SimpleDateData::pc, DateData::s, s_virtual_sg(), simple_dat_p, and SimpleDateData::year.
Referenced by d_lite_initialize_copy(), m_canonicalize_jd(), m_jd(), m_julian_p(), m_local_jd(), and set_sg().
|
static |
Definition at line 3610 of file date_core.c.
Referenced by datetime_s_now(), and rb_gmtime_r().
|
inlinestatic |
Definition at line 1382 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 SimpleDateData::sg.
Referenced by date_s_civil(), datetime_s_civil(), expect_numeric(), valid_civil_p(), valid_civil_sub(), valid_commercial_p(), valid_ordinal_p(), and valid_weeknum_p().
Definition at line 3159 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 9014 of file date_core.c.
References assert, cDate, cDateTime, CLASS_OF, d_lite_ajd(), d_lite_amjd(), d_lite_asctime(), 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__load(), 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 940 of file date_core.c.
References INT2FIX, and sec_to_day().
Referenced by m_ajd(), m_amjd(), m_df(), m_fr(), m_local_df(), m_of_in_day(), and minus_dd().
Definition at line 8358 of file date_core.c.
References DECIMAL_SIZE_OF_LONG, memcpy, rb_strlen_lit, snprintf, and strftimev().
Referenced by dt_lite_iso8601(), and dt_lite_jisx0301().
|
inlinestatic |
Definition at line 895 of file date_core.c.
References DAY_IN_SECONDS, SimpleDateData::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 906 of file date_core.c.
References DAY_IN_SECONDS, SimpleDateData::jd, and ComplexDateData::of.
Referenced by get_c_civil(), and local_jd().
Definition at line 7003 of file date_core.c.
References FIX2INT, FIXNUM_P, and snprintf.
Referenced by d_lite_jisx0301().
Definition at line 1963 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 1969 of file date_core.c.
References f_kind_of_p(), and rb_cNumeric.
Referenced by cmp_gen(), d_lite_marshal_load(), equal_gen(), and expect_numeric().
Definition at line 1975 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 1302 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 1293 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 3619 of file date_core.c.
References set_sg().
Referenced by date_s_today(), datetime_s_now(), and rb_localtime_r().
Definition at line 1561 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(), d_lite_ajd(), and d_lite_jisx0301().
Definition at line 1593 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().
Definition at line 1403 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 1843 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 1815 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 1480 of file date_core.c.
References DateData::c, ComplexDateData::df, get_c_df(), isec_to_day(), 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 1541 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 1671 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 1886 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 1427 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 1650 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(), SimpleDateData::sg, and simple_dat_p.
Referenced by d_lite_julian_p(), and m_gregorian_p().
|
static |
Definition at line 1499 of file date_core.c.
References get_c_df(), isec_to_day(), local_df(), and simple_dat_p.
Referenced by m_fr().
|
static |
Definition at line 1453 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(), d_lite_saturday_p(), datetime_to_date(), m_cweek(), m_cwyear(), m_real_local_jd(), m_wday(), m_wnumx(), and m_yday().
|
inlinestatic |
Definition at line 1751 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_mday(), d_lite_rshift(), date_to_time(), datetime_to_time(), and m_yday().
|
inlinestatic |
Definition at line 1901 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 1730 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_mon(), d_lite_rshift(), d_lite_saturday_p(), date_to_time(), datetime_to_time(), and m_yday().
Definition at line 1416 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 1622 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(), datetime_to_time(), m_of_in_day(), m_zone(), mk_inspect(), and tmx_m_of().
Definition at line 1633 of file date_core.c.
References isec_to_day(), and m_of().
Referenced by d_lite_jisx0301(), and d_lite_offset().
|
inlinestatic |
Definition at line 1688 of file date_core.c.
References isinf(), m_sg(), and SimpleDateData::sg.
Referenced by m_yday().
|
inlinestatic |
Definition at line 1677 of file date_core.c.
References isinf(), m_sg(), and SimpleDateData::sg.
Referenced by m_yday().
Definition at line 1825 of file date_core.c.
References encode_year(), f_zero_p(), INT2FIX, m_cwyear(), m_gregorian_p(), m_nth(), SimpleDateData::nth, and SimpleDateData::year.
Referenced by d_lite_cwyear().
Definition at line 1440 of file date_core.c.
References encode_jd(), SimpleDateData::jd, m_jd(), m_nth(), and SimpleDateData::nth.
Referenced by m_ajd(), m_amjd(), mk_inspect(), and tmx_m_secs().
Definition at line 1467 of file date_core.c.
References encode_jd(), SimpleDateData::jd, m_local_jd(), m_nth(), and SimpleDateData::nth.
Referenced by d_lite_jd(), d_lite_jisx0301(), d_lite_ld(), d_lite_mjd(), d_lite_rshift(), and equal_gen().
Definition at line 1712 of file date_core.c.
References encode_year(), f_zero_p(), INT2FIX, m_gregorian_p(), m_nth(), m_year(), SimpleDateData::nth, and SimpleDateData::year.
Referenced by d_lite_jisx0301(), d_lite_rshift(), d_lite_year(), date_to_time(), and datetime_to_time().
|
inlinestatic |
Definition at line 1916 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 1518 of file date_core.c.
References DateData::c, INT2FIX, ns_to_day(), 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 1535 of file date_core.c.
References m_sf(), and ns_to_sec().
Referenced by d_lite_sec_fraction(), and datetime_to_time().
|
inlinestatic |
Definition at line 1639 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_jisx0301(), 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 1103 of file date_core.c.
References c_virtual_sg(), s_virtual_sg(), and simple_dat_p.
Referenced by d_lite_leap_p(), d_lite_saturday_p(), m_cweek(), m_cwyear(), m_wnumx(), and m_yday().
|
static |
Definition at line 1809 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 |
|
static |
|
static |
Definition at line 1864 of file date_core.c.
References c_jd_to_weeknum(), m_local_jd(), and m_virtual_sg().
|
static |
Definition at line 1791 of file date_core.c.
References c_gregorian_to_yday(), c_jd_to_ordinal(), c_julian_to_yday(), SimpleDateData::jd, m_local_jd(), m_mday(), m_mon(), m_proleptic_gregorian_p(), m_proleptic_julian_p(), m_virtual_sg(), m_year(), and SimpleDateData::sg.
Referenced by d_lite_yday().
|
inlinestatic |
Definition at line 1699 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_leap_p(), d_lite_saturday_p(), m_real_year(), and m_yday().
Definition at line 1949 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 3176 of file date_core.c.
References f_idiv, f_mod, f_quo, INT2FIX, to_integer(), and wholenum_p().
Definition at line 5830 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, RB_TYPE_P, SECOND_IN_NANOSECONDS, and T_RATIONAL.
Referenced by d_lite_minus().
Definition at line 8992 of file date_core.c.
References len, Qnil, rb_ary_new2, rb_ary_push(), rb_obj_freeze(), and rb_usascii_str_new2.
Referenced by Init_date_core().
Definition at line 6529 of file date_core.c.
References m_df(), m_of(), m_real_jd(), m_sf(), m_sg(), PRIsVALUE, rb_enc_sprintf(), and rb_usascii_encoding().
Referenced by d_lite_inspect().
Definition at line 946 of file date_core.c.
References day_in_nanoseconds, f_quo, FIXNUM_P, INT2FIX, rb_rational_new2, and SECOND_IN_MILLISECONDS.
Referenced by datetime_to_datetime(), m_ajd(), m_amjd(), m_fr(), m_sf(), minus_dd(), and ns_to_sec().
Definition at line 964 of file date_core.c.
References f_quo, FIXNUM_P, INT2FIX, ns_to_day(), rb_rational_new2, and SECOND_IN_NANOSECONDS.
Referenced by datetime_to_datetime(), and m_sf_in_sec().
|
static |
Definition at line 1940 of file date_core.c.
References decode_offset, rb_enc_sprintf(), and rb_usascii_encoding().
Referenced by m_zone().
|
static |
Definition at line 2334 of file date_core.c.
References date_zone_to_diff(), DAY_IN_SECONDS, day_to_sec(), expect_numeric(), f_eqeq_p(), f_round, f_to_r, FIX2LONG, FIXNUM_P, k_rational_p(), rb_rational_den(), rb_rational_num(), rb_warning(), RFLOAT_VALUE, round(), T_FIXNUM, T_FLOAT, T_RATIONAL, T_STRING, and TYPE.
|
static |
Definition at line 3030 of file date_core.c.
References argc, argv, c_valid_start_p(), d_complex_new_internal(), d_simple_new_internal(), 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, f_zero_p(), half_days_in_day, HAVE_DF, HAVE_JD, INT2FIX, SimpleDateData::jd, SimpleDateData::nth, NUM2DBL, NUM2INT, ComplexDateData::of, rb_eArgError, rb_raise(), rb_scan_args(), rb_warning(), SECOND_IN_NANOSECONDS, ComplexDateData::sf, and SimpleDateData::sg.
Referenced by d_lite_marshal_load().
Definition at line 3991 of file date_core.c.
References encode_jd(), SimpleDateData::nth, 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 4006 of file date_core.c.
References encode_jd(), SimpleDateData::nth, NUM2DBL, NUM2INT, Qnil, and valid_commercial_p().
Referenced by rt__valid_date_frags_p().
Definition at line 4036 of file date_core.c.
References f_eqeq_p(), f_mod, f_sub, f_zero_p(), INT2FIX, SimpleDateData::jd, NIL_P, Qnil, ref_hash, rt__valid_civil_p(), rt__valid_commercial_p(), rt__valid_jd_p(), rt__valid_ordinal_p(), rt__valid_weeknum_p(), and SimpleDateData::year.
Referenced by d_new_by_frags(), and dt_new_by_frags().
Definition at line 3970 of file date_core.c.
References SimpleDateData::jd.
Referenced by rt__valid_date_frags_p().
Definition at line 3976 of file date_core.c.
References encode_jd(), SimpleDateData::nth, NUM2DBL, NUM2INT, Qnil, and valid_ordinal_p().
Referenced by rt__valid_date_frags_p().
Definition at line 4021 of file date_core.c.
References encode_jd(), SimpleDateData::nth, NUM2DBL, NUM2INT, Qnil, and valid_weeknum_p().
Referenced by rt__valid_date_frags_p().
Definition at line 3728 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(), INT2FIX, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, 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 3687 of file date_core.c.
References DAY_IN_SECONDS, del_hash, f_add, f_idiv, f_mod, hash(), HOUR_IN_SECONDS, INT2FIX, 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 3193 of file date_core.c.
References f_idiv, f_mod, f_quo, INT2FIX, to_integer(), and wholenum_p().
|
inlinestatic |
Definition at line 1079 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().
|
static |
Definition at line 980 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 932 of file date_core.c.
References DAY_IN_SECONDS, f_quo, FIXNUM_P, INT2FIX, and rb_rational_new2.
Referenced by datetime_to_datetime(), and isec_to_day().
Definition at line 1015 of file date_core.c.
References f_mul, FIX2LONG, INT2FIX, LONG2FIX, safe_mul_p(), and SECOND_IN_MILLISECONDS.
Referenced by datetime_to_datetime(), and tmx_m_msecs().
Definition at line 1023 of file date_core.c.
References f_mul, FIX2LONG, INT2FIX, LONG2FIX, safe_mul_p(), and SECOND_IN_NANOSECONDS.
Referenced by datetime_to_datetime(), decode_day(), div_df(), dt_new_by_frags(), and time_to_datetime().
|
static |
Definition at line 5452 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 5354 of file date_core.c.
References DateData::c, clear_civil(), date_sg_t, 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(), localtime_r(), time_to_date(), and time_to_datetime().
Definition at line 6665 of file date_core.c.
References tmx::dat, tmx::funcs, get_d1, and tmx_funcs.
Referenced by d_lite_hash().
Definition at line 6913 of file date_core.c.
References buf, date_strftime_alloc(), len, RB_GC_GUARD, rb_usascii_str_new(), SMALLBUF, and xfree().
Referenced by d_lite_asctime(), d_lite_hash(), d_lite_httpdate(), d_lite_iso8601(), d_lite_jisx0301(), d_lite_rfc2822(), d_lite_rfc3339(), d_lite_to_s(), dt_lite_iso8601(), dt_lite_to_s(), and iso8601_timediv().
Definition at line 8461 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, SimpleDateData::nth, and set_sg().
Referenced by Init_date_core().
Definition at line 8491 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, SimpleDateData::nth, sec_to_ns(), and set_sg().
Referenced by Init_date_core().
|
inlinestatic |
Definition at line 917 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 8449 of file date_core.c.
Referenced by Init_date_core().
Definition at line 6618 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().
|
static |
Definition at line 6632 of file date_core.c.
References m_of().
Definition at line 6600 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 6638 of file date_core.c.
References m_zone(), and RSTRING_PTR.
Definition at line 3132 of file date_core.c.
References f_to_i, and RB_INTEGER_TYPE_P.
Referenced by d_trunc(), h_trunc(), min_trunc(), and s_trunc().
|
static |
Definition at line 2204 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 SimpleDateData::jd.
Referenced by d_lite_rshift(), date_s_civil(), datetime_s_civil(), rt__valid_civil_p(), and valid_civil_sub().
Definition at line 2487 of file date_core.c.
References argc, argv, DBL2NUM, encode_jd(), GREGORIAN, guess_style(), INT2FIX, SimpleDateData::nth, NUM2DBL, NUM2INT, Qnil, rb_scan_args(), SimpleDateData::sg, valid_civil_p(), valid_gregorian_p(), and valid_sg.
Referenced by date_s_valid_civil_p().
|
static |
Definition at line 2240 of file date_core.c.
References c_valid_commercial_p(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, and SimpleDateData::jd.
Referenced by date_s_commercial(), datetime_s_commercial(), rt__valid_commercial_p(), and valid_commercial_sub().
Definition at line 2658 of file date_core.c.
References argc, argv, DBL2NUM, encode_jd(), GREGORIAN, INT2FIX, SimpleDateData::nth, NUM2DBL, NUM2INT, Qnil, rb_scan_args(), SimpleDateData::sg, valid_commercial_p(), and valid_sg.
Referenced by date_s_valid_commercial_p().
|
static |
Definition at line 2195 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 2431 of file date_core.c.
References argc, argv, DBL2NUM, GREGORIAN, NUM2DBL, rb_scan_args(), SimpleDateData::sg, and valid_sg.
Referenced by date_s_valid_jd_p().
|
static |
Definition at line 2165 of file date_core.c.
References c_valid_ordinal_p(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, and SimpleDateData::jd.
Referenced by date_s_ordinal(), datetime_s_ordinal(), rt__valid_ordinal_p(), and valid_ordinal_sub().
Definition at line 2578 of file date_core.c.
References argc, argv, DBL2NUM, encode_jd(), GREGORIAN, INT2FIX, SimpleDateData::nth, NUM2DBL, NUM2INT, Qnil, rb_scan_args(), SimpleDateData::sg, valid_ordinal_p(), and valid_sg.
Referenced by date_s_valid_ordinal_p().
|
static |
Definition at line 2270 of file date_core.c.
References c_valid_weeknum_p(), date_zone_to_diff(), decode_jd(), decode_year(), f_zero_p(), FIX2INT, guess_style(), INT2FIX, SimpleDateData::jd, SimpleDateData::nth, and SimpleDateData::sg.
Referenced by date_s_commercial(), date_s_valid_commercial_p(), datetime_s_commercial(), and rt__valid_weeknum_p().
|
inlinestatic |
Definition at line 3108 of file date_core.c.
References FIX2LONG, FIXNUM_P, rb_rational_den(), RFLOAT_VALUE, round(), 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 8986 of file date_core.c.
|
static |
Definition at line 8974 of file date_core.c.
|
static |
Definition at line 24 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 24 of file date_core.c.
Referenced by date_to_datetime(), Init_date_core(), rt_complete_frags(), and time_to_datetime().
|
static |
Definition at line 2952 of file date_core.c.
Referenced by d_complex_new_internal(), and d_simple_new_internal().
|
static |
Definition at line 25 of file date_core.c.
Referenced by day_to_sec(), Init_date_core(), and ns_to_day().
|
static |
Definition at line 8981 of file date_core.c.
|
static |
Definition at line 25 of file date_core.c.
Referenced by d_lite_marshal_load(), Init_date_core(), and old_to_new().
|
static |
Definition at line 23 of file date_core.c.
Referenced by f_cmp(), and Init_date_core().
|
static |
Definition at line 23 of file date_core.c.
Referenced by f_zero_p(), and Init_date_core().
|
static |
Definition at line 23 of file date_core.c.
Referenced by Init_date_core().
|
static |
Definition at line 23 of file date_core.c.
Referenced by f_le_p(), and Init_date_core().
|
static |
Definition at line 8966 of file date_core.c.
|
static |
Definition at line 672 of file date_core.c.
Referenced by c_gregorian_last_day_of_month(), and c_julian_last_day_of_month().
|
static |
Definition at line 26 of file date_core.c.
Referenced by c_virtual_sg(), guess_style(), Init_date_core(), and s_virtual_sg().
|
static |
Definition at line 26 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 6643 of file date_core.c.
Referenced by set_tmx().
|
static |
Definition at line 1771 of file date_core.c.
Referenced by c_gregorian_to_yday(), and c_julian_to_yday().