[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug: Incorrect duration format example in comments in 'org-duration.
From: |
Nicolas Goaziou |
Subject: |
Re: Bug: Incorrect duration format example in comments in 'org-duration.el' [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] |
Date: |
Tue, 20 Apr 2021 15:42:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Johnson <j3soon@gapp.nthu.edu.tw> writes:
> I'm contributing to an org file python parser to correctly parse durations.
>
> I found the comments in org-duration.el
> (https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-duration.el#L31
> <https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-duration.el#L31>),
> mentioning that `1d3h5min` is a valid duration format.
>
> So, I expect the following should work:
>
> M-x eval-expression <RET>
> (org-duration-string-to-minutes "1d3h5min") <RET>
I cannot reproduce it. I get 1625.0.
Maybe your Org is too old. So-called "compact" form was introduced after the
others.
Regards,
--
Nicolas Goaziou