1 line
1.5 KiB
Plaintext
1 line
1.5 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>Why are there different results from <code>org-read-date</code> in a Calc formula (via TBLFM) compared to a source block?</p> <pre><code>#+begin_src elisp (list (list (org-read-date nil nil "today") "today") (list (org-read-date nil nil "-Thu") "last Thursday") (list (format-time-string "%A %m/%d/%Y" (org-read-date nil t "-Thu")) "*correct*")) #+end_src #+RESULTS: | 2021-12-29 | today | | 2021-12-23 | last Thursday | | Thursday 12/23/2021 | *correct* | | Date: | Wednesday 12/29/2021 | *incorrect?* | #+TBLFM: $2='(format-time-string "%A %m/%d/%Y" (org-read-date nil t "-Thu")) #+begin_src elisp (list (list (emacs-version)) (list (replace-regexp-in-string "/home/.*?/" "/home/ELIDED/" (org-version nil t)))) #+end_src #+RESULTS: | GNU Emacs 27.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) | | Org mode version 9.5.2 (9.5.2-gfbff08 @ /home/ELIDED/.emacs.d/elpa/org-9.5.2/) | </code></pre> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Visual_Bumblebee_555"> /u/Visual_Bumblebee_555 </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/rruunf/are_there_table_formula_limitations_to_orgreaddate/">[link]</a></span>   <span><a href="https://www.reddit.com/r/orgmode/comments/rruunf/are_there_table_formula_limitations_to_orgreaddate/">[comments]</a></span> |