all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to get time difference with Elisp?
@ 2016-07-12 10:46 Karl Voit
  2016-07-12 11:14 ` tomas
  2016-07-12 13:34 ` Karl Voit
  0 siblings, 2 replies; 6+ messages in thread
From: Karl Voit @ 2016-07-12 10:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hi!

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
"14:58".

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.
                                                  http://Karl-Voit.at




^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <mailman.1166.1468320413.26859.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2016-07-12 13:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-12 10:46 How to get time difference with Elisp? Karl Voit
2016-07-12 11:14 ` tomas
2016-07-12 11:48   ` Karl Voit
2016-07-12 12:25     ` tomas
2016-07-12 13:34 ` Karl Voit
     [not found] <mailman.1166.1468320413.26859.help-gnu-emacs@gnu.org>
2016-07-12 11:48 ` Emanuel Berg

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.