emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* <now> not an org time string?
@ 2020-03-03 23:08 Samuel Wales
  2020-03-03 23:42 ` Samuel Wales
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Wales @ 2020-03-03 23:08 UTC (permalink / raw)
  To: emacs-orgmode

seems this used to work but does not now.  what's a good replacement?

(defun alpha-org-daynum-from-ts (ts)
  ;; internal time
  ;; (org-time-string-to-time "[2000-01-01]")
  ;; (org-time-string-to-time "<2000-01-01>")
  ;; (org-time-string-to-time "<now>")
  (time-to-days (org-time-string-to-time ts)))
(defun alpha-org-daynum-from-now ()
  (alpha-org-daynum-from-ts "<now>"))


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: <now> not an org time string?
  2020-03-03 23:08 <now> not an org time string? Samuel Wales
@ 2020-03-03 23:42 ` Samuel Wales
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Wales @ 2020-03-03 23:42 UTC (permalink / raw)
  To: emacs-orgmode

never mind.  (time-to-days (float-time)) is sufficient.

On 3/3/20, Samuel Wales <samologist@gmail.com> wrote:
> seems this used to work but does not now.  what's a good replacement?
>
> (defun alpha-org-daynum-from-ts (ts)
>   ;; internal time
>   ;; (org-time-string-to-time "[2000-01-01]")
>   ;; (org-time-string-to-time "<2000-01-01>")
>   ;; (org-time-string-to-time "<now>")
>   (time-to-days (org-time-string-to-time ts)))
> (defun alpha-org-daynum-from-now ()
>   (alpha-org-daynum-from-ts "<now>"))
>
>
> --
> The Kafka Pandemic
>
> What is misopathy?
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-03 23:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 23:08 <now> not an org time string? Samuel Wales
2020-03-03 23:42 ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).