Project

General

Profile

Actions

Bug #12273

closed

Time.parse incorrectly parses Russian months

Added by leemour (Viacheslav Ptsarev) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:74893]

Description

When parsing dates in Russian where day number is 31, Time.parse returns 2016-05-01. No matter what month or year is provided.
31 march 2016:

irb(main):003:0> require "time"
=> true
irb(main):004:0> Time.parse "31 марта 2016"
=> 2016-05-01 00:00:00 +0300
irb(main):005:0> Time.parse "31 march 2016"
=> 2016-03-31 00:00:00 +0300
irb(main):006:0> Time.parse "31 mars 2016"
=> 2016-03-31 00:00:00 +0300

31 december 2013:

irb(main):013:0> Time.parse "31 декабря 2013"
=> 2016-05-01 00:00:00 +0300
irb(main):014:0> Time.parse "31 december 2013"
=> 2013-12-31 00:00:00 +0400
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0