It looks like Ruby's Time::strptime
isn't properly plumbed to strptime(3)
and ignores week arguments altogether.
001> RUBY_DESCRIPTION
# => "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]"
002> require 'time'
# => true
003> fmt_string = '%Y-W%W-%w'
# => "%Y-W%W-%w"
004> week_iso8601 = Time.now.strftime(fmt_string) # formatting works
# => "2013-W46-4"
005> Time.strptime(week_iso8601, fmt_string) # but parsing doesn't.
# => 2013-01-01 00:00:00 +0000
So far I can repro this in 1.9.3 and jruby-1.7.4 on my local machine, but I would appreciate a repro on a non-mac box before I dive in too deep.