[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84485] [Ruby trunk Bug#14241] Time.strptime() doesn't support the directive "%W".
From:
abdelrazzak.ahmed@...
Date:
2017-12-26 19:37:20 UTC
List:
ruby-core #84485
Issue #14241 has been updated by mad-raz (Ahmed A.Razzak).
To add to the report, the Time.strptime doesn't support any of the following directives
~~~
%w %W %j %u
~~~
basically, it doesn't support anything outputted from the Date._strptim that is not in the following hash keys
(https://github.com/ruby/ruby/blob/ruby_2_5/lib/time.rb#L448)
~~~
:year , :mon, :mday, :hour, :min, :sec, :sec_fraction, :zone
~~~
and the previous format directives produce various different keys like
~~~
:wnum1, :cwday, :wday, :yday
~~~
examples:
~~~
irb > Date.strptime("2017 1 3", "%Y %W %u").strftime("%F")
=> "2017-01-04"
irb > Time.strptime("2017 1 3", "%Y %W %u").strftime("%F")
=> "2017-01-01"
irb > Date.strptime("2017 20", "%Y %j").strftime("%F")
=> "2017-01-20"
irb > Time.strptime("2017 20", "%Y %j").strftime("%F")
=> "2017-01-01"
~~~
----------------------------------------
Bug #14241: Time.strptime() doesn't support the directive "%W".
https://bugs.ruby-lang.org/issues/14241#change-68999
* Author: stsuboi (Sougo TSUBOI)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
According to reference manual, Time.strptime() accepts the directive "%W" in a format string, but it seems not to be worked.
On the other hand, Date.strptime() accepts "%W" correctly.
C:\>ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
C:\>irb
irb(main):001:0> require "time"
=> true
irb(main):003:0> Time.strptime("2017 1", "%Y %W").strftime("%F")
=> "2017-01-01"
irb(main):004:0> Date.strptime("2017 1", "%Y %W").strftime("%F")
=> "2017-01-02"
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>