mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/date/date_core.c (datetime_s_{iso8601,rfc3339,xmlschema,rfc2822,httpdate}):
do not take argument comp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4a400e5372
commit
87eeed5103
2 changed files with 17 additions and 24 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Jun 11 22:07:56 2011 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* ext/date/date_core.c (datetime_s_{iso8601,rfc3339,xmlschema,rfc2822,httpdate}):
|
||||
do not take argument comp.
|
||||
|
||||
Sat Jun 11 21:58:31 2011 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* ext/date/date_core.c: added examples.
|
||||
|
|
|
@ -7545,16 +7545,14 @@ datetime_s_parse(int argc, VALUE *argv, VALUE klass)
|
|||
static VALUE
|
||||
datetime_s_iso8601(int argc, VALUE *argv, VALUE klass)
|
||||
{
|
||||
VALUE str, comp, sg;
|
||||
VALUE str, sg;
|
||||
|
||||
rb_scan_args(argc, argv, "03", &str, &comp, &sg);
|
||||
rb_scan_args(argc, argv, "02", &str, &sg);
|
||||
|
||||
switch (argc) {
|
||||
case 0:
|
||||
str = rb_str_new2("-4712-01-01T00:00:00+00:00");
|
||||
case 1:
|
||||
comp = Qtrue;
|
||||
case 2:
|
||||
sg = INT2FIX(DEFAULT_SG);
|
||||
}
|
||||
|
||||
|
@ -7579,16 +7577,14 @@ datetime_s_iso8601(int argc, VALUE *argv, VALUE klass)
|
|||
static VALUE
|
||||
datetime_s_rfc3339(int argc, VALUE *argv, VALUE klass)
|
||||
{
|
||||
VALUE str, comp, sg;
|
||||
VALUE str, sg;
|
||||
|
||||
rb_scan_args(argc, argv, "03", &str, &comp, &sg);
|
||||
rb_scan_args(argc, argv, "02", &str, &sg);
|
||||
|
||||
switch (argc) {
|
||||
case 0:
|
||||
str = rb_str_new2("-4712-01-01T00:00:00+00:00");
|
||||
case 1:
|
||||
comp = Qtrue;
|
||||
case 2:
|
||||
sg = INT2FIX(DEFAULT_SG);
|
||||
}
|
||||
|
||||
|
@ -7613,16 +7609,14 @@ datetime_s_rfc3339(int argc, VALUE *argv, VALUE klass)
|
|||
static VALUE
|
||||
datetime_s_xmlschema(int argc, VALUE *argv, VALUE klass)
|
||||
{
|
||||
VALUE str, comp, sg;
|
||||
VALUE str, sg;
|
||||
|
||||
rb_scan_args(argc, argv, "03", &str, &comp, &sg);
|
||||
rb_scan_args(argc, argv, "02", &str, &sg);
|
||||
|
||||
switch (argc) {
|
||||
case 0:
|
||||
str = rb_str_new2("-4712-01-01T00:00:00+00:00");
|
||||
case 1:
|
||||
comp = Qtrue;
|
||||
case 2:
|
||||
sg = INT2FIX(DEFAULT_SG);
|
||||
}
|
||||
|
||||
|
@ -7648,16 +7642,14 @@ datetime_s_xmlschema(int argc, VALUE *argv, VALUE klass)
|
|||
static VALUE
|
||||
datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
|
||||
{
|
||||
VALUE str, comp, sg;
|
||||
VALUE str, sg;
|
||||
|
||||
rb_scan_args(argc, argv, "03", &str, &comp, &sg);
|
||||
rb_scan_args(argc, argv, "02", &str, &sg);
|
||||
|
||||
switch (argc) {
|
||||
case 0:
|
||||
str = rb_str_new2("Mon, 1 Jan -4712 00:00:00 +0000");
|
||||
case 1:
|
||||
comp = Qtrue;
|
||||
case 2:
|
||||
sg = INT2FIX(DEFAULT_SG);
|
||||
}
|
||||
|
||||
|
@ -7682,16 +7674,14 @@ datetime_s_rfc2822(int argc, VALUE *argv, VALUE klass)
|
|||
static VALUE
|
||||
datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
|
||||
{
|
||||
VALUE str, comp, sg;
|
||||
VALUE str, sg;
|
||||
|
||||
rb_scan_args(argc, argv, "03", &str, &comp, &sg);
|
||||
rb_scan_args(argc, argv, "02", &str, &sg);
|
||||
|
||||
switch (argc) {
|
||||
case 0:
|
||||
str = rb_str_new2("Mon, 01 Jan -4712 00:00:00 GMT");
|
||||
case 1:
|
||||
comp = Qtrue;
|
||||
case 2:
|
||||
sg = INT2FIX(DEFAULT_SG);
|
||||
}
|
||||
|
||||
|
@ -7716,16 +7706,14 @@ datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
|
|||
static VALUE
|
||||
datetime_s_jisx0301(int argc, VALUE *argv, VALUE klass)
|
||||
{
|
||||
VALUE str, comp, sg;
|
||||
VALUE str, sg;
|
||||
|
||||
rb_scan_args(argc, argv, "03", &str, &comp, &sg);
|
||||
rb_scan_args(argc, argv, "02", &str, &sg);
|
||||
|
||||
switch (argc) {
|
||||
case 0:
|
||||
str = rb_str_new2("-4712-01-01T00:00:00+00:00");
|
||||
case 1:
|
||||
comp = Qtrue;
|
||||
case 2:
|
||||
sg = INT2FIX(DEFAULT_SG);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue