From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0rtxJNgYs2fPTgAA62LTzQ:P1 (envelope-from ) for ; Mon, 17 Feb 2025 11:09:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0rtxJNgYs2fPTgAA62LTzQ (envelope-from ) for ; Mon, 17 Feb 2025 12:09:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=El5IgsIC; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=El5IgsIC; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1739790551; a=rsa-sha256; cv=none; b=FeghQHdvUHWZaoi0Zf+qb9MJXpUuZEvJD9h2JLaKe5HWArFoNGR+be9gplTK4taIVnMBIL Tc6fWhRMkbSmpz7QxojvPhi7UHbdjH7xldEKYfBgBjJkNJU83886FkTWLHPQscVvqJov5P 4KUV9rag1LTo+p5OaUnj0+ZUvHpewEaCLNJW2shzwXPFrPvNyvXeW261h8rw7ZpnVWEZtk 5KQ+4vFs4e2BgND4LOKX/6Pfu4fCtRsebJ/IGdDfDGAOVMRFDLCu0JJsN1wgf4mvh5PfY+ C2EWukE6Yq9Iei2mhDXJf8yCRIUCrGouGqeKDhAeew4d4xfV3slF5xwKEhalxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1739790551; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tTiu7QxYZtjFEacbU8zOxdOGbRJrzKwKe7mekzvD9c8=; b=jB0yJ5hYiEFG4XK7rIaTpFtPPqNmLsuLwb6kYu/Rebr2W62VGvUuNIqMm+0HR4J+7eYkCj NTDAudMt3YQFrjLTwl8BRa1ij+B1SPgK/oQ5EPC6G8heGqrd1ky8x4pyJSUAnJcfinX/8C Ghzwe6ajMKqmPCstIacyXB2fjRYrWM2NzqUVEF0gzQBHt1TellIyu20ZaWQ5if35Lc2xq9 YSpXSpzaq/0laC06cNtWAjbRGKyxSoJXJjZWxjJm9M3sM3QK4sekfcZT/dApCDDOyuB7Vw FuvBzHY1T3JFo782VvH/alf1ej2z63ClFZXfTcEFfsrrqytkkYy1X3o6IZn7AQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 82CA9804FC for ; Mon, 17 Feb 2025 12:09:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjyz4-0007Z5-Kl; Mon, 17 Feb 2025 06:08:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjyz2-0007YZ-LY for emacs-orgmode@gnu.org; Mon, 17 Feb 2025 06:08:16 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjyz0-00042T-2m for emacs-orgmode@gnu.org; Mon, 17 Feb 2025 06:08:15 -0500 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-220d601886fso54339065ad.1 for ; Mon, 17 Feb 2025 03:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739790491; x=1740395291; darn=gnu.org; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=tTiu7QxYZtjFEacbU8zOxdOGbRJrzKwKe7mekzvD9c8=; b=El5IgsICZ0eFxO9rRQkmAZyVplnqhWHzB5Rqfj+NXpvPcce/Gl2XrLnHpxREeLtD5u NJkQ5T4g1+4kJvCTBrNNMi4NmOHIYbHVsW38t+gZQtTx1+1ja9jJ+aBVH3gSBE31FGa1 H/mfoSx90TCEulvFJEta54njqTxJ/n6upSUpaWALVlEY8G3wBpMgtqv+irq1WIPvjAlJ lKIyejL414G1t+gleYtfD6v8mzXRnmsZx/8cAeP94UNUR5MyqBNcC9qkF4ZXS6qb4hmG XvvsFp3N3denUyIi0t/UWp3vCJBlusYnobwIwd24Hdoi43M/6COhMg33J2aFCjMuEYZS rcGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739790491; x=1740395291; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=tTiu7QxYZtjFEacbU8zOxdOGbRJrzKwKe7mekzvD9c8=; b=n2Y3Rl+FkoOMjWkWf1Bs/E1PVQTTVCq+PHkqh3i77obhwR4NFi3OaVtmFEppwsxDus KxdWEIUtazghJjYCSLwbcyRMKU3GpRggVuJK5LYUD5do6GIX0IwI8VrYosR3TuVCnTXP /l6inrjKAZPRxHKAQrMc1LkiXMNe3oNTbWpb5vuMTNkQG4OF32wI+Rp7FDAbcPS9m/Wz QDDW14GQ26bgRmiyZFZNemQc2QD2vgKP9N2AMmT7b+7+XhJnEsopCNxz+jiYEXX2EJ39 TvJ4NPgsuS1es0nftSJ6f5X5q3fAVIZGvvQBwd/NDxvGvrbR6igZo9ImdZd1ex4gr1Aa 5D/g== X-Gm-Message-State: AOJu0Yzmkvl/YlDIIWo/PVutieKEhlEj5xwMdJSPuN5GeIuKn5Ee4/iU MJSYyxwpgUrDrr4AunlUhV+v5pxsjBa8fNaEXTx2/fWifLkIo7z2PdzN8eNc X-Gm-Gg: ASbGncur58KMP+YtgW/85SRH5X9Jyfq86TywHlpX23j6+WbNwAly6DaKMeMjzYeeFrb hOn0VOpCz2LfJbFdv3Y3Ww4FGEq33tETbpIu9oQ43RRF1R4DdPyqANCj/G3mzOxdzdj498YylZs vyzYi387PWiUJ0UjN6ZYDpZMCO8TYnoSG95Gkj4tsLK2P0sOJxFMNSJfaEOV9pr5dWzaVif2Tdw +Bb5WzTvK9NF8ApGahuL/JhK4HJetNWGBnJu/RCZMSHa5irCay/9SskA9rE8rHaa9PBpurkk+dX Xbkkn+ZY1L1tHcFv7egY X-Google-Smtp-Source: AGHT+IHOprjxWionjbrA3Ua1eOvF7PUU3WrgOeHqazUSr9JZcZcH/SgTjmNXY+se4Z7E/E5qDSQC2g== X-Received: by 2002:a05:6a21:6e91:b0:1ee:321b:313b with SMTP id adf61e73a8af0-1ee8cc16c14mr17716976637.41.1739790491434; Mon, 17 Feb 2025 03:08:11 -0800 (PST) Received: from [192.168.1.105] ([159.196.132.61]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73242546182sm7732623b3a.32.2025.02.17.03.08.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Feb 2025 03:08:11 -0800 (PST) Message-ID: <5e55afa5-d714-409e-867e-cae8f27b7d9a@gmail.com> Date: Mon, 17 Feb 2025 19:08:07 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: emacs-orgmode@gnu.org Content-Language: en-US From: Zoey Hewll Subject: [FR] org-read-date-style Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=zoeyhewll@gmail.com; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.77 X-Spam-Score: -7.77 X-Migadu-Queue-Id: 82CA9804FC X-Migadu-Scanner: mx10.migadu.com X-TUID: 04D6XgwIAX8X Hi all, I have a feature request pertaining to date parsing in the date-time entry prompt (=C-.=). * Motivation The prevailing date format where I live is D/M/Y, often abbreviated to D/M. While I prefer Y-M-D as a persistent storage format, I naturally default to D/M and prefer it for data entry. Especially when entering recent dates (with =org-read-date-prefer-future= set to nil), which usually do not require the year component and therefore the unambiguous ISO 8601 format (Y-M-D) is slower to input in full, and does not match the locally conventional order (D/M) when abbreviated (M-D). * Proposal The =org-read-date= function understands slash-separated dates in the "american" format (M/D/Y and M/D). This code could be modified so that the parsing of slash-separated dates depends on user preference, by introducing a configuration variable like =calendar-date-style=, which I'm tentatively naming =org-read-date-style=. Like =calendar-date-style=, this would change the parsing of slash-separated dates by =org-read-date=, but it would not change the order of arguments passed to date-processing functions. It would support at least =american= (M/D and M/D/Y) and =european= (D/M and D/M/Y) options. * Example By default, =org-read-date-style= would be =american=, and so the date "12/3" entered at the =C-.= prompt would be interpreted as December 3rd. If =org-read-date-style= were set to =european=, the same date input "12/3" would be interpreted as the 12th of March. * Alternatives and Extensions - =org-read-date= could simply read the value of =calendar-date-style= rather than introducing a new configuration item. I propose a new item because of the well-documented pitfalls of =calendar-date-style=. - There could be an option to entirely forbid dates in slash-separated formats, if the user wishes to avoid the possibility of this kind of misinterpretation. I have not proposed this as I have no use for it. - This could simply be left to each user's own configuration (i.e. patching the org-mode code on a per-user basis). I suspect this feature would help other org-mode users who habitually use D/M/Y. (side-note: I have not attached a patch as I am yet to complete the copyright assignment, but I thought the feature was worthwhile to request regardless.) * Prior Discussion I did a quick search over the archives to see if this had been proposed before, but the closest I could see to this request was [[https://list.orgmode.org/20130129193653.6460d3b5@hsdev.com/][Date/time promptĀ  parses '3-2' as 'Month-Day', can I configure it to parse it as 'Day-Month' ?]], which does not address slash-separated dates, and [[https://list.orgmode.org/876322hcps.wl%25ded-law@ddoherty.net/][Date Prompt Bug (or Anomoly)]] which covers the same code but doesn't address intentionally entering D/M/Y dates. Regards, Zoey