diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-06-20 19:21:35 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-06-21 16:16:15 +0900 |
commit | 995923b7f9178c234f8c685f434407eb4f0eeb5c (patch) | |
tree | 181d0aebe5ba39126e75664dc7cffce8bf3e4cc2 /lib/time.rb | |
parent | 956d18722384b01690040de8828eb8f81c1bfd97 (diff) |
[DOC] Mentioned that `Time.parse` method is not validator
Diffstat (limited to 'lib/time.rb')
-rw-r--r-- | lib/time.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/time.rb b/lib/time.rb index b534c7825c..625c2c87bb 100644 --- a/lib/time.rb +++ b/lib/time.rb @@ -272,6 +272,11 @@ class Time # Takes a string representation of a Time and attempts to parse it # using a heuristic. # + # This method **does not** function as a validator. If the input + # string does not match valid formats strictly, you may get a + # cryptic result. Should consider to use `Time.strptime` instead + # of this method as possible. + # # require 'time' # # Time.parse("2010-10-31") #=> 2010-10-31 00:00:00 -0500 |