method
new!

v2_6_3 -
Show latest stable
-
0 notes -
Class: Date
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (38)
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (-38)
- What's this?
new!(p1 = v1, p2 = v2, p3 = v3)
public
Hide source
static VALUE date_s_new_bang(int argc, VALUE *argv, VALUE klass) { VALUE ajd, of, sg, nth, sf; int jd, df, rof; double rsg; rb_scan_args(argc, argv, "03", &ajd, &of, &sg); switch (argc) { case 0: ajd = INT2FIX(0); case 1: of = INT2FIX(0); case 2: sg = INT2FIX(DEFAULT_SG); } old_to_new(ajd, of, sg, &nth, &jd, &df, &sf, &rof, &rsg); if (!df && f_zero_p(sf) && !rof) return d_simple_new_internal(klass, nth, jd, rsg, 0, 0, 0, HAVE_JD); else return d_complex_new_internal(klass, nth, jd, df, sf, rof, rsg, 0, 0, 0, 0, 0, 0, HAVE_JD | HAVE_DF); }