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

ruby-changes:45949

From: stomar <ko1@a...>
Date: Sun, 19 Mar 2017 18:51:35 +0900 (JST)
Subject: [ruby-changes:45949] stomar:r58020 (trunk): date_core.c: fix error in DateTime docs

stomar	2017-03-19 18:51:29 +0900 (Sun, 19 Mar 2017)

  New Revision: 58020

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58020

  Log:
    date_core.c: fix error in DateTime docs
    
    * ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
      Reported by Andreas Rayo Kniep.  [ruby-core:68418] [Bug #10936]
    
    * ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
      DateTime#xmlschema; other small improvements.

  Modified files:
    trunk/ext/date/date_core.c
Index: ext/date/date_core.c
===================================================================
--- ext/date/date_core.c	(revision 58019)
+++ ext/date/date_core.c	(revision 58020)
@@ -6735,9 +6735,9 @@ date_strftime_internal(int argc, VALUE * https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L6735
  * Any text not listed as a directive will be passed through to the
  * output string.
  *
- * The directive consists of a percent (%) character,
- * zero or more flags, optional minimum field width,
- * optional modifier and a conversion specifier
+ * A directive consists of a percent (%) character,
+ * zero or more flags, an optional minimum field width,
+ * an optional modifier, and a conversion specifier
  * as follows.
  *
  *    %<flags><width><modifier><conversion>
@@ -8179,9 +8179,9 @@ dt_lite_to_s(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L8179
  * Any text not listed as a directive will be passed through to the
  * output string.
  *
- * The directive consists of a percent (%) character,
- * zero or more flags, optional minimum field width,
- * optional modifier and a conversion specifier
+ * A directive consists of a percent (%) character,
+ * zero or more flags, an optional minimum field width,
+ * an optional modifier, and a conversion specifier
  * as follows.
  *
  *    %<flags><width><modifier><conversion>
@@ -8375,8 +8375,8 @@ iso8601_timediv(VALUE self, long n) https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L8375
  *    dt.iso8601([n=0])    ->  string
  *    dt.xmlschema([n=0])  ->  string
  *
- * This method is equivalent to strftime('%FT%T').  The optional
- * argument +n+ is the number of digits for fractional seconds.
+ * This method is equivalent to strftime('%FT%T%:z').
+ * The optional argument +n+ is the number of digits for fractional seconds.
  *
  *    DateTime.parse('2001-02-03T04:05:06.123456789+07:00').iso8601(9)
  *				#=> "2001-02-03T04:05:06.123456789+07:00"
@@ -8398,8 +8398,8 @@ dt_lite_iso8601(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L8398
  * call-seq:
  *    dt.rfc3339([n=0])  ->  string
  *
- * This method is equivalent to strftime('%FT%T').  The optional
- * argument n is length of fractional seconds.
+ * This method is equivalent to strftime('%FT%T%:z').
+ * The optional argument +n+ is the number of digits for fractional seconds.
  *
  *    DateTime.parse('2001-02-03T04:05:06.123456789+07:00').rfc3339(9)
  *				#=> "2001-02-03T04:05:06.123456789+07:00"
@@ -8414,8 +8414,8 @@ dt_lite_rfc3339(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L8414
  * call-seq:
  *    dt.jisx0301([n=0])  ->  string
  *
- * Returns a string in a JIS X 0301 format.  The optional argument n
- * is length of fractional seconds.
+ * Returns a string in a JIS X 0301 format.
+ * The optional argument +n+ is the number of digits for fractional seconds.
  *
  *    DateTime.parse('2001-02-03T04:05:06.123456789+07:00').jisx0301(9)
  *				#=> "H13.02.03T04:05:06.123456789+07:00"

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

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