mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/date/date_core.c: [ruby-core:42998]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
97d6e56b0e
commit
3486a98a71
3 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Feb 28 20:27:25 2012 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
|
* ext/date/date_core.c: [ruby-core:42998]
|
||||||
|
|
||||||
Tue Feb 28 18:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Feb 28 18:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (io_binwrite, rb_io_syswrite): use shared frozen source
|
* io.c (io_binwrite, rb_io_syswrite): use shared frozen source
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
date_core.c: Coded by Tadayoshi Funaba 2010, 2011
|
date_core.c: Coded by Tadayoshi Funaba 2010-2012
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
|
@ -8487,6 +8487,7 @@ iso8601_timediv(VALUE self, VALUE n)
|
||||||
{
|
{
|
||||||
VALUE fmt;
|
VALUE fmt;
|
||||||
|
|
||||||
|
n = to_integer(n);
|
||||||
fmt = rb_usascii_str_new2("T%H:%M:%S");
|
fmt = rb_usascii_str_new2("T%H:%M:%S");
|
||||||
if (f_gt_p(n, INT2FIX(0))) {
|
if (f_gt_p(n, INT2FIX(0))) {
|
||||||
VALUE argv[3];
|
VALUE argv[3];
|
||||||
|
|
|
@ -367,9 +367,15 @@ class TestDateStrftime < Test::Unit::TestCase
|
||||||
assert_equal('2001-02-03T04:05:06.123+00:00', d2.iso8601(3))
|
assert_equal('2001-02-03T04:05:06.123+00:00', d2.iso8601(3))
|
||||||
assert_equal('2001-02-03T04:05:06.123+00:00', d2.rfc3339(3))
|
assert_equal('2001-02-03T04:05:06.123+00:00', d2.rfc3339(3))
|
||||||
assert_equal('H13.02.03T04:05:06.123+00:00', d2.jisx0301(3))
|
assert_equal('H13.02.03T04:05:06.123+00:00', d2.jisx0301(3))
|
||||||
|
assert_equal('2001-02-03T04:05:06.123+00:00', d2.iso8601(3.5))
|
||||||
|
assert_equal('2001-02-03T04:05:06.123+00:00', d2.rfc3339(3.5))
|
||||||
|
assert_equal('H13.02.03T04:05:06.123+00:00', d2.jisx0301(3.5))
|
||||||
assert_equal('2001-02-03T04:05:06.123456000+00:00', d2.iso8601(9))
|
assert_equal('2001-02-03T04:05:06.123456000+00:00', d2.iso8601(9))
|
||||||
assert_equal('2001-02-03T04:05:06.123456000+00:00', d2.rfc3339(9))
|
assert_equal('2001-02-03T04:05:06.123456000+00:00', d2.rfc3339(9))
|
||||||
assert_equal('H13.02.03T04:05:06.123456000+00:00', d2.jisx0301(9))
|
assert_equal('H13.02.03T04:05:06.123456000+00:00', d2.jisx0301(9))
|
||||||
|
assert_equal('2001-02-03T04:05:06.123456000+00:00', d2.iso8601(9.9))
|
||||||
|
assert_equal('2001-02-03T04:05:06.123456000+00:00', d2.rfc3339(9.9))
|
||||||
|
assert_equal('H13.02.03T04:05:06.123456000+00:00', d2.jisx0301(9.9))
|
||||||
|
|
||||||
assert_equal('1800-01-01T00:00:00+00:00', DateTime.new(1800).jisx0301)
|
assert_equal('1800-01-01T00:00:00+00:00', DateTime.new(1800).jisx0301)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue