[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/timeclock.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/timeclock.el |
Date: |
Sat, 13 Jul 2002 14:51:28 -0400 |
Index: emacs/lisp/calendar/timeclock.el
diff -c emacs/lisp/calendar/timeclock.el:1.20
emacs/lisp/calendar/timeclock.el:1.21
*** emacs/lisp/calendar/timeclock.el:1.20 Fri Jul 12 19:35:37 2002
--- emacs/lisp/calendar/timeclock.el Sat Jul 13 14:51:28 2002
***************
*** 338,346 ****
(error "You've already clocked in!")
(unless timeclock-last-event
(timeclock-reread-log))
! (unless (equal (timeclock-time-to-date
! (cadr timeclock-last-event))
! (timeclock-time-to-date (current-time)))
(let ((workday (or (and (numberp arg) arg)
(and arg 0)
(and timeclock-get-workday-function
--- 338,348 ----
(error "You've already clocked in!")
(unless timeclock-last-event
(timeclock-reread-log))
! ;; Either no log file, or day has rolled over.
! (unless (and timeclock-last-event
! (equal (timeclock-time-to-date
! (cadr timeclock-last-event))
! (timeclock-time-to-date (current-time))))
(let ((workday (or (and (numberp arg) arg)
(and arg 0)
(and timeclock-get-workday-function
***************
*** 349,355 ****
(run-hooks 'timeclock-first-in-hook)
;; settle the discrepancy for the new day
(setq timeclock-discrepancy
! (- timeclock-discrepancy workday))
(if (not (= workday timeclock-workday))
(timeclock-log "h" (and (numberp arg)
(number-to-string arg))))))
--- 351,357 ----
(run-hooks 'timeclock-first-in-hook)
;; settle the discrepancy for the new day
(setq timeclock-discrepancy
! (- (or timeclock-discrepancy 0) workday))
(if (not (= workday timeclock-workday))
(timeclock-log "h" (and (numberp arg)
(number-to-string arg))))))