[前][次][番号順一覧][スレッド一覧]

ruby-changes:19874

From: tadf <ko1@a...>
Date: Sun, 5 Jun 2011 06:25:22 +0900 (JST)
Subject: [ruby-changes:19874] tadf:r31921 (trunk): * NEWS: wrote about changes of date.

tadf	2011-06-05 06:25:11 +0900 (Sun, 05 Jun 2011)

  New Revision: 31921

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31921

  Log:
    * NEWS: wrote about changes of date.

  Modified files:
    trunk/ChangeLog
    trunk/NEWS

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31920)
+++ ChangeLog	(revision 31921)
@@ -1,3 +1,7 @@
+Sun Jun  5 06:22:02 2011  Tadayoshi Funaba  <tadf@d...>
+
+	* NEWS: wrote about changes of date.
+
 Sat Jun  4 16:59:26 2011  Tadayoshi Funaba  <tadf@d...>
 
 	* ext/date/date_core.c (d_lite_inspect): changed the format.
Index: NEWS
===================================================================
--- NEWS	(revision 31920)
+++ NEWS	(revision 31921)
@@ -98,6 +98,47 @@
       the precision of the receiver BigDecimal to produce the digits of a
       BigDecimal from the given Rational.
 
+* date
+
+  * Accepts flonum explicitly with limitations.
+    * If the given offset is flonum, DateTime assumes its precision is
+      at most second.
+
+      DateTime.new(2001,2,3,0,0,0,3.0/24) ==
+      DateTime.new(2001,2,3,0,0,0,'+03:00')
+        #=> true
+
+    * If the given operand for -/+ is flonum, DateTime assumes its
+      precision is at most nanosecond.
+
+      DateTime.new(2001,2,3) + 0.5 == DateTime.new(2001,2,3,12)
+        #=> true
+
+    * Precision of offset is always at most second.
+
+      Rational('0.5') == Rational('0.500001')  #=> false
+      DateTime.new(2001,2,3,0,0,0,Rational('0.5')) ==
+      DateTime.new(2001,2,3,0,0,0,Rational('0.500001'))
+        #=> true
+
+  * Ignores long offset and far reform day (with warning).
+
+    * Now accepts only:
+
+      -1<=offset<=1 (-24:00..+24:00)
+      2298874<=start<=2426355 or -/+oo
+        (proleptic Gregorian/Julian mean -/+oo)
+
+  * A method strftime cannot produce huge output (same as Time's one).
+
+    * Even though Date/DateTime can handle far dates, the following gives
+      an empty string:
+
+      DateTime.new(1<<10000).strftime('%Y')  #=> ""
+
+  * Changed the format of inspect.
+  * Changed the format of marshal (but, can load old dumps).
+
 * io/console
   * new methods:
     * IO#noecho {|io| }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]