1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/date/date_core.c: [DOC] Clean up whitespace, examples, and typos

in date_core based on a patch by @vipulnsward [Fixes GH-724]
  https://github.com/ruby/ruby/pull/724


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2014-10-12 18:21:41 +00:00
parent 37d0c873f6
commit 6769d5d5ac
2 changed files with 37 additions and 25 deletions

View file

@ -1,3 +1,9 @@
Mon Oct 13 03:20:23 2014 Zachary Scott <e@zzak.io>
* ext/date/date_core.c: [DOC] Clean up whitespace, examples, and typos
in date_core based on a patch by @vipulnsward [Fixes GH-724]
https://github.com/ruby/ruby/pull/724
Mon Oct 13 02:39:26 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (remove_duplicate_keys): should not simply eliminate all

View file

@ -9090,10 +9090,9 @@ Init_date_core(void)
*
* In those classes, this is so-called "mjd".
*
*
* == Date
*
* A subclass of Object includes Comparable module, easily handles
* A subclass of Object that includes Comparable module and easily handles
* date.
*
* Date object is created with Date::new, Date::jd, Date::ordinal,
@ -9102,14 +9101,20 @@ Init_date_core(void)
*
* require 'date'
*
* Date.new(2001,2,3) #=> #<Date: 2001-02-03 ...>
* Date.jd(2451944) #=> #<Date: 2001-02-03 ...>
* Date.ordinal(2001,34) #=> #<Date: 2001-02-03 ...>
* Date.commercial(2001,5,6) #=> #<Date: 2001-02-03 ...>
* Date.parse('2001-02-03') #=> #<Date: 2001-02-03 ...>
* Date.new(2001,2,3)
* #=> #<Date: 2001-02-03 ...>
* Date.jd(2451944)
* #=> #<Date: 2001-02-03 ...>
* Date.ordinal(2001,34)
* #=> #<Date: 2001-02-03 ...>
* Date.commercial(2001,5,6)
* #=> #<Date: 2001-02-03 ...>
* Date.parse('2001-02-03')
* #=> #<Date: 2001-02-03 ...>
* Date.strptime('03-02-2001', '%d-%m-%Y')
* #=> #<Date: 2001-02-03 ...>
* Time.new(2001,2,3).to_date #=> #<Date: 2001-02-03 ...>
* Time.new(2001,2,3).to_date
* #=> #<Date: 2001-02-03 ...>
*
* All date objects are immutable; hence cannot modify themselves.
*
@ -9121,7 +9126,7 @@ Init_date_core(void)
* decoded local time with the day count. The day of calendar
* reform denotes the start day of the new style. The old style
* of the West is the Julian calendar which was adopted by
* Caersar. The new style is the Gregorian calendar, which is the
* Caesar. The new style is the Gregorian calendar, which is the
* current civil calendar of many countries.
*
* The day count is virtually the astronomical Julian day number.
@ -9162,7 +9167,7 @@ Init_date_core(void)
*
* == DateTime
*
* A subclass of Date easily handles date, hour, minute, second and
* A subclass of Date that easily handles date, hour, minute, second and
* offset.
*
* DateTime does not consider any leap seconds, does not track
@ -9177,7 +9182,7 @@ Init_date_core(void)
* DateTime.new(2001,2,3,4,5,6)
* #=> #<DateTime: 2001-02-03T04:05:06+00:00 ...>
*
* The last element of day, hour, minute or senond can be
* The last element of day, hour, minute or second can be
* fractional number. The fractional number's precision is assumed
* at most nanosecond.
*
@ -9193,6 +9198,7 @@ Init_date_core(void)
*
* DateTime.new(2001,2,3,4,5,6,Rational(3,24))
* #=> #<DateTime: 2001-02-03T04:05:06+03:00 ...>
*
* also accepts string form.
*
* DateTime.new(2001,2,3,4,5,6,'+03:00')