emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug: org-read-date: problem with year in dotted european date input


From: Gregor Zattler
Subject: [O] Bug: org-read-date: problem with year in dotted european date input [7.9.2 (release_7.9.2-436-g9b11e6 @ /home/grfz/src/org-mode/lisp/)] (was: Re: how to customise Emacs to recognise 13.10. as 13th of October this year instead of 2010-10-13?)
Date: Fri, 12 Oct 2012 17:14:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Dear org-moders,

I now believe I found a bug in org-read-date.  There is a problem
parsing European dotted dates.  In Dates the like DD.MM.YYYY or
DD.MM.YY or DD.MM. `MM' is recognised as year instead of month:

Today is 2012-10-11:

(org-read-date t nil "Kommt am 27.10.2012 um 14:00 Uhr")
gives
"2010-10-27"
expectet outcome is
"2012-10-27"

Same with abbreviated years:
(org-read-date t nil "Kommt am 27.10.12 um 14:00 Uhr")
"2010-10-27"
expectet outcome is
"2012-10-27"

Days are interpreted correctly:
(org-read-date t nil "Kommt am 27. um 14:00 Uhr")
"2012-10-27"

Since I customised german day names this also is correct:
(org-read-date t nil "Kommt am Sonntag um 14:00 Uhr")
"2012-10-14"

The most common way of expressing dates this year is interpreted
wrongly: 
(org-read-date t nil "Kommt am 27.10. um 14:00 Uhr")
"2010-10-27"
expectet outcome is
"2012-10-27"

I read the source of org-read-date but didn't grok it.  The regex
in the section labeled ";; Help matching dotted european dates"
looks good to me, but...

Emacs  : GNU Emacs 24.2.50.1 (i486-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2012-10-09 on dex, modified by Debian
Package: Org-mode version 7.9.2 (release_7.9.2-436-g9b11e6 @ 
/home/grfz/src/org-mode/lisp/)


I also did these tests with `env -i emacs -d :0.0 -Q':
- GNU Emacs 24.2.50.1 / Org-mode 7.9.2
- GNU Emacs 23.4.1    / Org-mode: 6.33x
--> same results (with the exception of german day names).



Thanks for your attention, Gregor



* Gregor Zattler <address@hidden> [11. Oct. 2012]:
> 
> 
> today (2012-10-11) I yanked "Kommt am 13.10. um 14:00 zum" into
> the date/time prompt: the date is recognised as "<2010-10-13 Mi
> 14:00>" instead of <2012-10-13 Sa 14:00> as I would expect since
> I have the following customisations (excerpt):
> 
> (custom-set-variables
> ;[...]
>  '(calendar-date-style (quote european))
> ;[...]
>  '(diary-date-forms (quote ((day "\\. ?" month "\\. ?[^0-9]") 
>                            (day "\\. ?" month "\\. ?" year "[^0-9]") 
>                            (day "/" month "[^/0-9]") 
>                            (day "/" month "/" year "[^0-9]") 
>                            (backup day " *" monthname 
> "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)") 
>                            (day " *" monthname " *" year "[^0-9]") 
>                            (dayname "\\W"))))
> ;[...]
> )
> 
> as part of my .init.el.
> 
> 
> I thought the first diary date form would match this text but it
> doesn't.  Even "Kommt am 13.10.2012 um 14:00 zum" is parsed as 
> "<2010-10-13 Mi 14:00>".  I thought the second diary date form
> would match this.
> 
> Before I realised this I captured several events with wrong dates.
> 
> Any Ideas?
> 
> Ciao, Gregor
> 

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]