|
Ruby
1.9.3p551(2014-11-13revision48407)
|
Go to the source code of this file.
Data Structures | |
| struct | zone |
Macros | |
| #define | sizeof_array(o) (sizeof o / sizeof o[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_idiv(x, y) rb_funcall(x, rb_intern("div"), 1, y) |
| #define | f_mod(x, y) rb_funcall(x, '%', 1, y) |
| #define | f_expt(x, y) rb_funcall(x, rb_intern("**"), 1, y) |
| #define | f_lt_p(x, y) rb_funcall(x, '<', 1, y) |
| #define | f_gt_p(x, y) rb_funcall(x, '>', 1, y) |
| #define | f_le_p(x, y) rb_funcall(x, rb_intern("<="), 1, y) |
| #define | f_ge_p(x, y) rb_funcall(x, rb_intern(">="), 1, y) |
| #define | f_to_s(x) rb_funcall(x, rb_intern("to_s"), 0) |
| #define | f_match(r, s) rb_funcall(r, rb_intern("match"), 1, s) |
| #define | f_aref(o, i) rb_funcall(o, rb_intern("[]"), 1, i) |
| #define | f_aref2(o, i, j) rb_funcall(o, rb_intern("[]"), 2, i, j) |
| #define | f_begin(o, i) rb_funcall(o, rb_intern("begin"), 1, i) |
| #define | f_end(o, i) rb_funcall(o, rb_intern("end"), 1, i) |
| #define | f_aset(o, i, v) rb_funcall(o, rb_intern("[]="), 2, i, v) |
| #define | f_aset2(o, i, j, v) rb_funcall(o, rb_intern("[]="), 3, i, j, v) |
| #define | f_sub_bang(s, r, x) rb_funcall(s, rb_intern("sub!"), 2, r, x) |
| #define | f_gsub_bang(s, r, x) rb_funcall(s, rb_intern("gsub!"), 2, r, x) |
| #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 | cstr2num(s) rb_cstr_to_inum(s, 10, 0) |
| #define | str2num(s) rb_str_to_inum(s, 10, 0) |
| #define | issign(c) ((c) == '-' || (c) == '+') |
| #define | asp_string() rb_str_new(" ", 1) |
| #define | DAYS "sunday|monday|tuesday|wednesday|thursday|friday|saturday" |
| #define | MONTHS "january|february|march|april|may|june|july|august|september|october|november|december" |
| #define | ABBR_DAYS "sun|mon|tue|wed|thu|fri|sat" |
| #define | ABBR_MONTHS "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec" |
| #define | REGCOMP(pat, opt) |
| #define | REGCOMP_0(pat) REGCOMP(pat, 0) |
| #define | REGCOMP_I(pat) REGCOMP(pat, ONIG_OPTION_IGNORECASE) |
| #define | MATCH(s, p, c) |
| #define | SUBS(s, p, c) |
| #define | STD " standard time" |
| #define | DST " daylight time" |
| #define | DST " dst" |
| #define | HAVE_ALPHA (1<<0) |
| #define | HAVE_DIGIT (1<<1) |
| #define | HAVE_DASH (1<<2) |
| #define | HAVE_DOT (1<<3) |
| #define | HAVE_SLASH (1<<4) |
| #define | HAVE_ELEM_P(x) ((check_class(str) & (x)) == (x)) |
| #define | SNUM 14 |
| #define | SNUM 17 |
| #define | SNUM 5 |
| #define | iso8601_bas_time_cb iso8601_ext_time_cb |
| #define | SNUM 8 |
| #define | SNUM 8 |
| #define | SNUM 5 |
| #define | SNUM 4 |
| #define | SNUM 8 |
| #define | SNUM 8 |
| #define | SNUM 8 |
| #define | SNUM 7 |
| #define | SNUM 9 |
Functions | |
| static void | s3e (VALUE hash, VALUE y, VALUE m, VALUE d, int bc) |
| static VALUE | regcomp (const char *source, long len, int opt) |
| static int | match (VALUE str, VALUE pat, VALUE hash, int(*cb)(VALUE, VALUE)) |
| static int | subs (VALUE str, VALUE pat, VALUE hash, int(*cb)(VALUE, VALUE)) |
| VALUE | date_zone_to_diff (VALUE str) |
| static int | day_num (VALUE s) |
| static int | mon_num (VALUE s) |
| static int | parse_day_cb (VALUE m, VALUE hash) |
| static int | parse_day (VALUE str, VALUE hash) |
| static int | parse_time2_cb (VALUE m, VALUE hash) |
| static int | parse_time_cb (VALUE m, VALUE hash) |
| static int | parse_time (VALUE str, VALUE hash) |
Variables | |
| static const char * | abbr_days [] |
| static const char * | abbr_months [] |
| static struct zone | zones_source [] |
| #define ABBR_DAYS "sun|mon|tue|wed|thu|fri|sat" |
Definition at line 217 of file date_parse.c.
Referenced by parse_day().
| #define ABBR_MONTHS "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec" |
Definition at line 218 of file date_parse.c.
| #define asp_string | ( | ) | rb_str_new(" ", 1) |
Definition at line 56 of file date_parse.c.
Referenced by subs().
| #define cstr2num | ( | s | ) | rb_cstr_to_inum(s, 10, 0) |
Definition at line 42 of file date_parse.c.
Referenced by date_zone_to_diff(), and s3e().
| #define DAYS "sunday|monday|tuesday|wednesday|thursday|friday|saturday" |
Definition at line 215 of file date_parse.c.
| #define del_hash | ( | k | ) | rb_hash_delete(hash, ID2SYM(rb_intern(k))) |
Definition at line 40 of file date_parse.c.
| #define DST " daylight time" |
Referenced by date_zone_to_diff().
| #define DST " dst" |
| #define f_add | ( | x, | |
| y | |||
| ) | rb_funcall(x, '+', 1, y) |
Definition at line 13 of file date_parse.c.
Referenced by date_zone_to_diff(), and s3e().
| #define f_aref | ( | o, | |
| i | |||
| ) | rb_funcall(o, rb_intern("[]"), 1, i) |
Definition at line 29 of file date_parse.c.
Referenced by date_zone_to_diff().
| #define f_aref2 | ( | o, | |
| i, | |||
| j | |||
| ) | rb_funcall(o, rb_intern("[]"), 2, i, j) |
Definition at line 30 of file date_parse.c.
Definition at line 33 of file date_parse.c.
Definition at line 34 of file date_parse.c.
Referenced by subs().
| #define f_begin | ( | o, | |
| i | |||
| ) | rb_funcall(o, rb_intern("begin"), 1, i) |
Definition at line 31 of file date_parse.c.
Referenced by subs().
| #define f_div | ( | x, | |
| y | |||
| ) | rb_funcall(x, '/', 1, y) |
Definition at line 16 of file date_parse.c.
| #define f_end | ( | o, | |
| i | |||
| ) | rb_funcall(o, rb_intern("end"), 1, i) |
Definition at line 32 of file date_parse.c.
Referenced by subs().
| #define f_expt | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern("**"), 1, y) |
Definition at line 19 of file date_parse.c.
Referenced by date_zone_to_diff(), and parse_time2_cb().
| #define f_ge_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern(">="), 1, y) |
Definition at line 24 of file date_parse.c.
| #define f_gsub_bang | ( | s, | |
| r, | |||
| x | |||
| ) | rb_funcall(s, rb_intern("gsub!"), 2, r, x) |
Definition at line 36 of file date_parse.c.
| #define f_gt_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, '>', 1, y) |
Definition at line 22 of file date_parse.c.
| #define f_idiv | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern("div"), 1, y) |
Definition at line 17 of file date_parse.c.
| #define f_le_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern("<="), 1, y) |
Definition at line 23 of file date_parse.c.
| #define f_lt_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, '<', 1, y) |
Definition at line 21 of file date_parse.c.
| #define f_match | ( | r, | |
| s | |||
| ) | rb_funcall(r, rb_intern("match"), 1, s) |
Definition at line 28 of file date_parse.c.
Referenced by match(), parse_time_cb(), and subs().
| #define f_mod | ( | x, | |
| y | |||
| ) | rb_funcall(x, '%', 1, y) |
Definition at line 18 of file date_parse.c.
| #define f_mul | ( | x, | |
| y | |||
| ) | rb_funcall(x, '*', 1, y) |
Definition at line 15 of file date_parse.c.
Referenced by date_zone_to_diff().
| #define f_negate | ( | x | ) | rb_funcall(x, rb_intern("-@"), 0) |
Definition at line 12 of file date_parse.c.
Referenced by date_zone_to_diff(), and s3e().
| #define f_sub | ( | x, | |
| y | |||
| ) | rb_funcall(x, '-', 1, y) |
Definition at line 14 of file date_parse.c.
| #define f_sub_bang | ( | s, | |
| r, | |||
| x | |||
| ) | rb_funcall(s, rb_intern("sub!"), 2, r, x) |
Definition at line 35 of file date_parse.c.
| #define f_to_s | ( | x | ) | rb_funcall(x, rb_intern("to_s"), 0) |
Definition at line 26 of file date_parse.c.
Referenced by s3e().
| #define HAVE_ALPHA (1<<0) |
| #define HAVE_DASH (1<<2) |
| #define HAVE_DIGIT (1<<1) |
| #define HAVE_DOT (1<<3) |
| #define HAVE_ELEM_P | ( | x | ) | ((check_class(str) & (x)) == (x)) |
| #define HAVE_SLASH (1<<4) |
| #define iso8601_bas_time_cb iso8601_ext_time_cb |
| #define issign | ( | c | ) | ((c) == '-' || (c) == '+') |
Definition at line 55 of file date_parse.c.
Referenced by date_zone_to_diff(), and s3e().
| #define MATCH | ( | s, | |
| p, | |||
| c | |||
| ) |
Definition at line 239 of file date_parse.c.
| #define MONTHS "january|february|march|april|may|june|july|august|september|october|november|december" |
Definition at line 216 of file date_parse.c.
| #define ref_hash | ( | k | ) | rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
Definition at line 39 of file date_parse.c.
| #define REGCOMP | ( | pat, | |
| opt | |||
| ) |
Definition at line 230 of file date_parse.c.
| #define REGCOMP_0 | ( | pat | ) | REGCOMP(pat, 0) |
Definition at line 236 of file date_parse.c.
| #define REGCOMP_I | ( | pat | ) | REGCOMP(pat, ONIG_OPTION_IGNORECASE) |
Definition at line 237 of file date_parse.c.
Referenced by parse_day(), parse_time(), and parse_time_cb().
Definition at line 38 of file date_parse.c.
Referenced by parse_day_cb(), parse_time2_cb(), parse_time_cb(), and s3e().
Definition at line 10 of file date_parse.c.
Referenced by date_zone_to_diff(), day_num(), and mon_num().
| #define SNUM 14 |
| #define SNUM 17 |
| #define SNUM 5 |
| #define SNUM 8 |
| #define SNUM 8 |
| #define SNUM 5 |
| #define SNUM 4 |
| #define SNUM 8 |
| #define SNUM 8 |
| #define SNUM 8 |
| #define SNUM 7 |
| #define SNUM 9 |
| #define STD " standard time" |
Referenced by date_zone_to_diff().
| #define str2num | ( | s | ) | rb_str_to_inum(s, 10, 0) |
Definition at line 43 of file date_parse.c.
Referenced by date_zone_to_diff(), and parse_time2_cb().
| #define SUBS | ( | s, | |
| p, | |||
| c | |||
| ) |
Definition at line 259 of file date_parse.c.
Referenced by parse_day(), and parse_time().
Definition at line 370 of file date_parse.c.
References ALLOCA_N, cstr2num, DST, f_add, f_aref, f_expt, f_mul, f_negate, i, INT2FIX, issign, LONG2NUM, min(), name, NIL_P, zone::offset, p, Qnil, RB_GC_GUARD, rb_gc_register_mark_object(), rb_hash_aset(), rb_hash_new(), rb_rational_new2, rb_str_new(), rb_str_new2(), RSTRING_LEN, RSTRING_PTR, sizeof_array, STD, str2num, strchr(), strlen(), T_STRING, TYPE, and zones_source.
Referenced by date__strptime_internal(), and offset_to_sec().
|
static |
Definition at line 562 of file date_parse.c.
References abbr_days, i, RSTRING_PTR, sizeof_array, and strncasecmp.
Referenced by parse_day_cb().
Definition at line 245 of file date_parse.c.
References f_match, hash(), and NIL_P.
Referenced by match_alloc(), match_aref(), match_array(), match_backref_number(), match_begin(), match_captures(), match_check(), match_end(), match_entry(), match_getter(), match_hash(), match_inspect(), match_names(), match_offset(), match_regexp(), match_size(), match_string(), match_to_a(), match_to_s(), match_values_at(), onig_search(), rb_match_busy(), rb_reg_backref_number(), rb_reg_last_match(), rb_reg_match_last(), rb_reg_match_post(), rb_reg_match_pre(), rb_reg_nth_defined(), rb_reg_nth_match(), rb_reg_s_last_match(), rb_reg_search(), rb_str_sub_bang(), rb_str_subpat(), rb_str_subpat_set(), reg_named_capture_assign_gen(), ruby_strtod(), scan_once(), str_gsub(), and update_char_offset().
|
static |
Definition at line 573 of file date_parse.c.
References abbr_months, i, RSTRING_PTR, sizeof_array, and strncasecmp.
Definition at line 594 of file date_parse.c.
References ABBR_DAYS, parse_day_cb(), Qnil, REGCOMP_I, and SUBS.
Definition at line 584 of file date_parse.c.
References day_num(), INT2FIX, rb_reg_nth_match(), and set_hash.
Referenced by parse_day().
Definition at line 680 of file date_parse.c.
References parse_time_cb(), Qnil, REGCOMP_I, and SUBS.
Definition at line 604 of file date_parse.c.
References f_expt, INT2FIX, LONG2NUM, min(), NIL_P, NUM2INT, p, rb_rational_new2, rb_reg_nth_match(), RSTRING_LEN, RSTRING_PTR, set_hash, and str2num.
Referenced by parse_time_cb().
Definition at line 647 of file date_parse.c.
References f_match, hash(), NIL_P, parse_time2_cb(), Qnil, rb_reg_nth_match(), REGCOMP_I, and set_hash.
Referenced by parse_time().
Definition at line 221 of file date_parse.c.
References len, rb_gc_register_mark_object(), and rb_reg_new().
Definition at line 265 of file date_parse.c.
References asp_string, f_aset2, f_begin, f_end, f_match, hash(), INT2FIX, LONG2NUM, NIL_P, and NUM2LONG().
|
static |
Definition at line 45 of file date_parse.c.
Referenced by day_num().
|
static |
Definition at line 50 of file date_parse.c.
Referenced by mon_num().
|
static |
Definition at line 291 of file date_parse.c.
Referenced by date_zone_to_diff().
1.8.14