https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112008-10-29T13:21:52ZRuby Issue Tracking SystemRuby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=14852008-10-29T13:21:52Zrogerdpack (Roger Pack)rogerpack2005@gmail.com
<ul></ul><p>=begin<br>
seems that Date is similarly broken on 1.9, working on 1.8</p>
<p>require 'date'<br>
Date::parse('06/21/95')</p>
<p>~ ruby19 test.rb<br>
/Users/rogerpack/dev/ruby_19_installed/lib/ruby/1.9.0/date.rb:1022:in <code>new_by_frags': invalid date (ArgumentError) from /Users/rogerpack/dev/ruby_19_installed/lib/ruby/1.9.0/date.rb:1066:in </code>parse'<br>
from test.rb:2:in `'</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=17862008-11-29T16:20:32Zko1 (Koichi Sasada)
<ul><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li></ul><p>=begin</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=19762008-12-11T12:33:15Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul><li><strong>Target version</strong> set to <i>1.9.1 Release Candidate</i></li></ul><p>=begin</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=21912008-12-21T00:09:48Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul><li><strong>Due date</strong> set to <i>12/24/2008</i></li><li><strong>Assignee</strong> deleted (<del><i>matz (Yukihiro Matsumoto)</i></del>)</li></ul><p>=begin</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=22082008-12-21T14:21:37Ztadf (tadayoshi funaba)
<ul></ul><p>=begin<br>
This is an intentional change (r12859).</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=22092008-12-21T14:34:09Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul></ul><p>=begin<br>
On 12/21/08 2:13 PM, tadayoshi funaba wrote:</p>
<blockquote>
<p>This is an intentional change (r12859).</p>
</blockquote>
<p>Can I regard this issue as rejected?</p>
<p>--<br>
Yugui <a href="mailto:yugui@yugui.jp" class="email">yugui@yugui.jp</a><br>
<a href="http://yugui.jp" class="external">http://yugui.jp</a></p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=22102008-12-21T14:42:59Ztadf (tadayoshi funaba)
<ul></ul><p>=begin<br>
yes, at least this is not a bug, i think.</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=22142008-12-21T23:03:19Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>=begin</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=22402008-12-22T16:45:32Zrogerdpack (Roger Pack)rogerpack2005@gmail.com
<ul></ul><p>=begin</p>
<blockquote>
<blockquote>
<p>This is an intentional change (r12859).</p>
</blockquote>
<p>Can I regard this issue as rejected?</p>
</blockquote>
<p>Seems somewhat surprising to me that<br>
Date::parse('06/21/95')</p>
<p>doesn't parse, though I suppose that's better than what 1.8.x currently does:<br>
irb(main):004:0> Date.parse("08/21/97").to_s<br>
=> "0097-08-21"</p>
<p>Which is definitely bad :)</p>
<p>Should I file these as feature requests to have them work [and guess century].</p>
<p>Also should I file a feature request to change Time.parse to raise on<br>
failed parse instead of returning Time.now [as you can't currently<br>
determine if a time parsed successfully or not--at least not easily].</p>
<p>Thanks!<br>
-=R</p>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=22482008-12-22T21:50:50Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>=begin</p>
<p>In message "Re: <a href="https://blade.ruby-lang.org/ruby-core/20779">[ruby-core:20779]</a> Re: [Bug <a class="issue tracker-1 status-6 priority-4 priority-default closed behind-schedule" title="Bug: Time parsing works in 1.8 but not 1.9 (Rejected)" href="https://redmine.ruby-lang.org/issues/634">#634</a>] Time parsing works in 1.8 but not 1.9"<br>
on Mon, 22 Dec 2008 16:36:53 +0900, "Roger Pack" <a href="mailto:rogerpack2005@gmail.com" class="email">rogerpack2005@gmail.com</a> writes:<br>
|<br>
|>> This is an intentional change (r12859).<br>
|><br>
|> Can I regard this issue as rejected?<br>
|<br>
|Seems somewhat surprising to me that<br>
|Date::parse('06/21/95')<br>
|<br>
|doesn't parse, though I suppose that's better than what 1.8.x currently does:<br>
|irb(main):004:0> Date.parse("08/21/97").to_s<br>
|=> "0097-08-21"<br>
|<br>
|Which is definitely bad :)</p>
<p>"dd/dd/dd" format itself is very culture dependent and ambiguous. It<br>
is yy/mm/dd in Japan (and other countries), mm/dd/yy in USA, dd/mm/yy<br>
in European countries, right? In some cases, you can tell them by<br>
accident, but we should not rely on luck in general cases. I believe<br>
that is the reason parsing this format is disabled in 1.9.</p>
<p>|Also should I file a feature request to change Time.parse to raise on<br>
|failed parse instead of returning Time.now [as you can't currently<br>
|determine if a time parsed successfully or not--at least not easily].</p>
<p>It seems reasonable. You can file a feature request for this issue.</p>
<pre><code> matz.
</code></pre>
<p>=end</p> Ruby master - Bug #634: Time parsing works in 1.8 but not 1.9https://redmine.ruby-lang.org/issues/634?journal_id=37542009-04-15T11:36:22Zrogerdpack (Roger Pack)rogerpack2005@gmail.com
<ul></ul><p>=begin<br>
should Date.parse("4/30/2009")<br>
parse in 1.9?</p>
<blockquote>
<blockquote>
<p>Date.parse("4/30/2009")<br>
ArgumentError: invalid date<br>
...</p>
</blockquote>
</blockquote>
<p>Thanks!<br>
=end</p>