From: "naruse (Yui NARUSE)" Date: 2012-04-13T00:27:45+09:00 Subject: [ruby-core:44311] [ruby-trunk - Bug #6282] strptime and fractions of seconds Issue #6282 has been updated by naruse (Yui NARUSE). lparra (Luis Parravicini) wrote: > I know, but where on the docs say so? r35312 adds the doc. ---------------------------------------- Bug #6282: strptime and fractions of seconds https://bugs.ruby-lang.org/issues/6282#change-25858 Author: lparra (Luis Parravicini) Status: Rejected Priority: Normal Assignee: tadf (tadayoshi funaba) Category: ext Target version: ruby -v: trunk =begin DateTime::strptime refers us to #strftime to check the format to use. DateTime#strftime says fractions of seconds can be specified with %N, %3N, %6N, %9N and %12N but strptime only recognizes %N. > d = DateTime.strptime("1:2:3.123", '%H:%M:%S.%3N') ArgumentError: invalid date And this works: > d = DateTime.strptime("1:2:3.1234567901234567890", '%H:%M:%S.%N') > d.sec_fraction => (123456790123456789/1000000000000000000) I don't know whether it's a bug or the intended functionality but shouldn't it say somewhere in the documentation about this? =end -- http://bugs.ruby-lang.org/