From: merch-redmine@... Date: 2019-06-26T23:39:54+00:00 Subject: [ruby-core:93376] [Ruby trunk Bug#12196] lib: Date.valid_date? returns incorrect response for negative day Issue #12196 has been updated by jeremyevans0 (Jeremy Evans). I don't think this is a bug in the code, but I do think we should improve the documentation for valid_date. I've added a pull request to do so: https://github.com/ruby/date/pull/7. ---------------------------------------- Bug #12196: lib: Date.valid_date? returns incorrect response for negative day https://bugs.ruby-lang.org/issues/12196#change-78899 * Author: ddoherty03 (Daniel Doherty) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.2.2 * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- ~~~ require 'date' puts RUBY_VERSION if Date.valid_date?(2016, 2, -1) puts "Valid" else puts "Invalid" end ~~~ This reports 'Valid' for a negative day number. -- https://bugs.ruby-lang.org/ Unsubscribe: