From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, T_SPF_PERMERROR,UNPARSEABLE_RELAY,URIBL_GREY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 0E3751F54E for ; Fri, 29 Jul 2022 08:27:01 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sendgrid.me header.i=@sendgrid.me header.b="zNfXHTfH"; dkim-atps=neutral Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id F2BDB121A1C; Fri, 29 Jul 2022 17:26:57 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 27DB5121A1C for ; Fri, 29 Jul 2022 17:26:55 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.me; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc; s=smtpapi; bh=kx+slEi7j+kkCHQFEfBCLkx+mdTbbAwwiejxaoAezLw=; b=zNfXHTfH0VF4w0S4YOpBX2qZO7IEBMxDjYBJ5YPDZ6DE8/3LDbltsIhhw+s99BwvIHvN +0AB1tnbifYGSdC+CpcgXWBi3SP8K5zBOPZf5bh6CjW7eIKYEl6DsXsOYOib9D/X7UlAOY hWl3gHV26YqMDFQ72Ycb4G1LcNwoZZFZk= Received: by filterdrecv-86cfc59b8c-x6wjk with SMTP id filterdrecv-86cfc59b8c-x6wjk-1-62E399CE-1 2022-07-29 08:26:54.083883279 +0000 UTC m=+649251.190306835 Received: from herokuapp.com (unknown) by geopod-ismtpd-3-3 (SG) with ESMTP id gsCCi9IpTCS-Adu5BuG6Cw for ; Fri, 29 Jul 2022 08:26:53.963 +0000 (UTC) Date: Fri, 29 Jul 2022 08:26:54 +0000 (UTC) From: "kei-p (Keisuke Ishizawa)" Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 18946 X-Redmine-Issue-Author: kei-p X-Redmine-Sender: kei-p X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 85765 X-SG-EID: =?us-ascii?Q?ZTwFz+eiYwDxgm5=2FwjcYr9wJZtleYhZts8QSM8SrgNh+cSeA=2Fw065WWa5IGAeu?= =?us-ascii?Q?DIjBBogllQsYCXa=2FmI8BbMCC5jc=2FB7qwPEif4ZD?= =?us-ascii?Q?oGjeSn5d4uJd5MS+V1SJzTrxGbpC1vWo8y9Wpec?= =?us-ascii?Q?CaABtAAHrEyiTZTJDeB9OxLtjd4MRRnKsNJpETT?= =?us-ascii?Q?Ft14zsqgI7Lnce2nQAISe9IHsuFOG2axYYYRbJM?= =?us-ascii?Q?JZaVaqvhVQZSjsZiX5j6k8Pq4bg+5L63bGPqrId?= =?us-ascii?Q?e3arzB0+BDrkJzlskcQ4Q=3D=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 51187 Subject: [ruby-dev:51187] [Ruby master Bug#18946] Time#to_date returns incorrect date X-BeenThere: ruby-dev@ruby-lang.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Ruby developers \(Japanese\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: "Ruby developers \(Japanese\)" Errors-To: ruby-dev-bounces@ruby-lang.org Sender: "ruby-dev" Issue #18946 has been updated by kei-p (Keisuke Ishizawa). > Time seems to use a proleptic Gregorian calendar (the Gregorian calendar extended to before the Gregorian reform, see https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar) while Date seems to be using the Julian calendar before the 'official' reform date. Thanks for the detailed explanation. I understand that this is due to the different calendars that Date and Time uses before the 'official' reform date. ---------------------------------------- Bug #18946: Time#to_date returns incorrect date https://bugs.ruby-lang.org/issues/18946#change-98505 * Author: kei-p (Keisuke Ishizawa) * Status: Open * Priority: Normal * ruby -v: 3.1.2 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Time#to_date returns incorrect date. Actual Behavior: ``` Time.local(1499, 12, 27).to_date => # ``` Expected Behavior: ``` Time.local(1499, 12, 27).to_date => # ``` -- https://bugs.ruby-lang.org/