summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-25 13:14:54 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-25 13:14:54 +0900
commit0abf781ab431f44c054523a3ab8f2b1c3768c898 (patch)
treeaa8eb2400c589948880ae7ceece524fac28ebd08
parent70aa7734e9c9c01b9ce3e4070a551d0334593907 (diff)
NEWS: Mention about more strict conversions for [Feature #17485]
-rw-r--r--NEWS.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/NEWS.md b/NEWS.md
index 43bc9decc7..2537882475 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -267,6 +267,19 @@ Note: We're only listing outstanding class updates.
timezone, as well as `Time.at` and `Time.now`, so that is now
you can omit minor arguments to `Time.new`. [[Feature #17485]]
+ ```ruby
+ Time.new(2021, 12, 25, in: "+07:00")
+ #=> 2021-12-25 00:00:00 +0700
+ ```
+
+ At the same time, time component strings are converted to
+ integers more strictly now.
+
+ ```ruby
+ Time.new(2021, 12, 25, "+07:00")
+ #=> invalid value for Integer(): "+07:00" (ArgumentError)
+ ```
+
* Time#strftime supports RFC 3339 UTC for unknown offset local
time, `-0000`, as `%-z`. [[Feature #17544]]