[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69894: 29.1; Icalendar export conflict with calendar iso date
From: |
Eli Zaretskii |
Subject: |
bug#69894: 29.1; Icalendar export conflict with calendar iso date |
Date: |
Thu, 28 Mar 2024 11:53:31 +0200 |
> Date: Tue, 19 Mar 2024 02:56:57 +0100
> From: RwN via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
>
> Dear All,
>
> In a diary file, with a simple entry entry "2024-03-19 10:00 Appointment",
> icalendar-export-file process to an error: "Could not parse date". The entry
> is provided by the default value of calendar-iso-date-display-form.
>
> I solve the problem with the following patch mathchin '-' has a separator in
> the function icalendar--datestring-to-isodate :
>
> diff -u --label /usr/local/share/emacs/29.1/lisp/calendar/icalendar.el.gz
> --label /tmp/icalendar.el /tmp/jka-commHr8dl /tmp/icalendar.el
> --- /usr/local/share/emacs/29.1/lisp/calendar/icalendar.el.gz
> +++ /tmp/icalendar.el
> @@ -894,8 +894,8 @@
> (save-match-data
> (cond ( ;; iso-style numeric date
> (string-match (concat "\\s-*"
> - "\\([0-9]\\{4\\}\\)[ \t/]\\s-*"
> - "0?\\([1-9][0-9]?\\)[ \t/]\\s-*"
> + "\\([0-9]\\{4\\}\\)[ \t/-]\\s-*"
> + "0?\\([1-9][0-9]?\\)[ \t/-]\\s-*"
> "0?\\([1-9][0-9]?\\)")
> datestring)
> (setq year (read (substring datestring (match-beginning 1)
>
> Diff finished. Tue Mar 19 02:40:06 2024
>
> Is it a correct solution to proposed?
Paul, WDYT about the proposed change?