ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:79433] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
@ 2017-02-05  9:51 ` sto.mar
  2017-02-06  2:44 ` [ruby-core:79442] " nobu
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: sto.mar @ 2017-02-05  9:51 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been reported by Marcus Stollsteimer.

----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193

* Author: Marcus Stollsteimer
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:79442] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
  2017-02-05  9:51 ` [ruby-core:79433] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime sto.mar
@ 2017-02-06  2:44 ` nobu
  2017-02-06  2:48 ` [ruby-core:79456] " nobu
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: nobu @ 2017-02-06  2:44 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been updated by Nobuyoshi Nakada.


Thank you for the great contribution.
Just curious what differs in examples of Jan 30 and Jan 31.

```diff
+ *    Date.new(2001,1,30) >>  1   #=> #<Date: 2001-02-28 ...>
+ *    Date.new(2001,1,31) >>  1   #=> #<Date: 2001-02-28 ...>
```

----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193#change-62872

* Author: Marcus Stollsteimer
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:79456] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
  2017-02-05  9:51 ` [ruby-core:79433] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime sto.mar
  2017-02-06  2:44 ` [ruby-core:79442] " nobu
@ 2017-02-06  2:48 ` nobu
  2017-02-06 21:05 ` [ruby-core:79460] " sto.mar
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: nobu @ 2017-02-06  2:48 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been updated by Nobuyoshi Nakada.


To "demonstrate that different dates can result in the same return value", isn't `Date.new(2001,1,28)` better?

----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193#change-62873

* Author: Marcus Stollsteimer
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:79460] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2017-02-06  2:48 ` [ruby-core:79456] " nobu
@ 2017-02-06 21:05 ` sto.mar
  2017-02-06 21:10 ` [ruby-core:79461] " sto.mar
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: sto.mar @ 2017-02-06 21:05 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been updated by Marcus Stollsteimer.


Nobuyoshi Nakada wrote:
> To "demonstrate that different dates can result in the same return value", isn't `Date.new(2001,1,28)` better?

Agreed.
Maybe there even should be an extra paragraph that explicitly points this out.

And maybe also the following, possibly surprising sort of behavior should be mentioned:

```
require "date"

date = Date.new(2001,1,31)
12.times { date >>= 1 }
date.to_s   # => "2002-01-28"

date = Date.new(2001,1,31)
date >>= 12
date.to_s   # => "2002-01-31"
```

Should I prepare a patch?

----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193#change-62891

* Author: Marcus Stollsteimer
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:79461] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2017-02-06 21:05 ` [ruby-core:79460] " sto.mar
@ 2017-02-06 21:10 ` sto.mar
  2017-03-12  8:06 ` [ruby-core:80051] " naruse
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: sto.mar @ 2017-02-06 21:10 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been updated by Marcus Stollsteimer.


A shorter version:

```
Date.new(2001,1,31) >> 2        # => #<Date: 2001-03-31 ...>
Date.new(2001,1,31) >> 1 >> 1   # => #<Date: 2001-03-28 ...>
```


----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193#change-62892

* Author: Marcus Stollsteimer
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:80051] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2017-02-06 21:10 ` [ruby-core:79461] " sto.mar
@ 2017-03-12  8:06 ` naruse
  2017-03-13  2:43 ` [ruby-core:80093] " nagachika00
  2017-03-25 16:48 ` [ruby-core:80333] " usa
  7 siblings, 0 replies; 8+ messages in thread
From: naruse @ 2017-03-12  8:06 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been updated by Yui NARUSE.

Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE

ruby_2_4 r57904 merged revision(s) 57549.

----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193#change-63478

* Author: Marcus Stollsteimer
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:80093] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2017-03-12  8:06 ` [ruby-core:80051] " naruse
@ 2017-03-13  2:43 ` nagachika00
  2017-03-25 16:48 ` [ruby-core:80333] " usa
  7 siblings, 0 replies; 8+ messages in thread
From: nagachika00 @ 2017-03-13  2:43 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE

----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193#change-63519

* Author: Marcus Stollsteimer
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ruby-core:80333] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime
       [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2017-03-13  2:43 ` [ruby-core:80093] " nagachika00
@ 2017-03-25 16:48 ` usa
  7 siblings, 0 replies; 8+ messages in thread
From: usa @ 2017-03-25 16:48 UTC (permalink / raw
  To: ruby-core

Issue #13193 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE to 2.2: DONE, 2.3: REQUIRED, 2.4: DONE

ruby_2_2 r58101 merged revision(s) 57549.

----------------------------------------
Bug #13193: [DOC] Revise docs for Date and DateTime
https://bugs.ruby-lang.org/issues/13193#change-63810

* Author: stomar (Marcus Stollsteimer)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [i686-linux]
* Backport: 2.2: DONE, 2.3: REQUIRED, 2.4: DONE
----------------------------------------
```
ext/date/date_core.c: [DOC] revise docs for Date and DateTime

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting
```

---Files--------------------------------
doc_date_datetime.patch (34.1 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-03-25 16:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-13193.20170205095138@ruby-lang.org>
2017-02-05  9:51 ` [ruby-core:79433] [Ruby trunk Bug#13193] [DOC] Revise docs for Date and DateTime sto.mar
2017-02-06  2:44 ` [ruby-core:79442] " nobu
2017-02-06  2:48 ` [ruby-core:79456] " nobu
2017-02-06 21:05 ` [ruby-core:79460] " sto.mar
2017-02-06 21:10 ` [ruby-core:79461] " sto.mar
2017-03-12  8:06 ` [ruby-core:80051] " naruse
2017-03-13  2:43 ` [ruby-core:80093] " nagachika00
2017-03-25 16:48 ` [ruby-core:80333] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).