[Top][All Lists]

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

How to get time difference with Elisp?

From: Karl Voit
Subject: How to get time difference with Elisp?
Date: Tue, 12 Jul 2016 12:46:37 +0200
User-agent: slrn/pre1.0.0-18 (Linux)


I need to determine total office hours of a day without the time
spent in lunch break. The source data is officebegin, officeend,
lunchbreakbegin, lunchbreakend - all in string format "HH:MM" like

So far, I failed miserably to find the right combination of
parse-time-string, encode-time, time-substract.

Even determining the difference between only two times resulted in
errors to me:

(setq difference (time-subtract (encode-time (parse-time-string "12:24"))
                                (encode-time (parse-time-string "11:45"))))

... results in: time-subtract: Wrong number of arguments: encode-time, 1

Can you help me? Thanks!

All in all, one of the most disturbing things today is the definitive
fact that the NSA, GCHQ, and many more government organizations are
massively terrorizing the freedom of us and the next generations.

reply via email to

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