Mercurial > emacs
comparison lisp/calendar/timeclock.el @ 90228:fa0da9b57058
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-82
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 542-553)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 116-121)
- Merge from emacs--cvs-trunk--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 19 Sep 2005 10:20:33 +0000 |
parents | f9a65d7ebd29 a65f8ec418fc |
children | ee12d75eb214 |
comparison
equal
deleted
inserted
replaced
90227:10fe5fadaf89 | 90228:fa0da9b57058 |
---|---|
439 (timeclock-seconds-to-string remainder show-seconds t) | 439 (timeclock-seconds-to-string remainder show-seconds t) |
440 (if (> remainder 0) | 440 (if (> remainder 0) |
441 "remaining" "over") | 441 "remaining" "over") |
442 (timeclock-when-to-leave-string show-seconds today-only))) | 442 (timeclock-when-to-leave-string show-seconds today-only))) |
443 (if (interactive-p) | 443 (if (interactive-p) |
444 (message status) | 444 (message "%s" status) |
445 status))) | 445 status))) |
446 | 446 |
447 ;;;###autoload | 447 ;;;###autoload |
448 (defun timeclock-change (&optional arg project) | 448 (defun timeclock-change (&optional arg project) |
449 "Change to working on a different project. | 449 "Change to working on a different project. |
510 (interactive) | 510 (interactive) |
511 (let ((string (timeclock-seconds-to-string | 511 (let ((string (timeclock-seconds-to-string |
512 (timeclock-workday-remaining today-only) | 512 (timeclock-workday-remaining today-only) |
513 show-seconds t))) | 513 show-seconds t))) |
514 (if (interactive-p) | 514 (if (interactive-p) |
515 (message string) | 515 (message "%s" string) |
516 string))) | 516 string))) |
517 | 517 |
518 (defsubst timeclock-workday-elapsed () | 518 (defsubst timeclock-workday-elapsed () |
519 "Return the number of seconds worked so far today. | 519 "Return the number of seconds worked so far today. |
520 If RELATIVE is non-nil, the amount returned will be relative to past | 520 If RELATIVE is non-nil, the amount returned will be relative to past |
532 non-nil, the amount returned will be relative to past time worked." | 532 non-nil, the amount returned will be relative to past time worked." |
533 (interactive) | 533 (interactive) |
534 (let ((string (timeclock-seconds-to-string (timeclock-workday-elapsed) | 534 (let ((string (timeclock-seconds-to-string (timeclock-workday-elapsed) |
535 show-seconds))) | 535 show-seconds))) |
536 (if (interactive-p) | 536 (if (interactive-p) |
537 (message string) | 537 (message "%s" string) |
538 string))) | 538 string))) |
539 | 539 |
540 (defsubst timeclock-time-to-seconds (time) | 540 (defsubst timeclock-time-to-seconds (time) |
541 "Convert TIME to a floating point number." | 541 "Convert TIME to a floating point number." |
542 (+ (* (car time) 65536.0) | 542 (+ (* (car time) 65536.0) |
577 (string | 577 (string |
578 (if show-seconds | 578 (if show-seconds |
579 (format-time-string "%-I:%M:%S %p" then) | 579 (format-time-string "%-I:%M:%S %p" then) |
580 (format-time-string "%-I:%M %p" then)))) | 580 (format-time-string "%-I:%M %p" then)))) |
581 (if (interactive-p) | 581 (if (interactive-p) |
582 (message string) | 582 (message "%s" string) |
583 string))) | 583 string))) |
584 | 584 |
585 ;;; Internal Functions: | 585 ;;; Internal Functions: |
586 | 586 |
587 (defvar timeclock-project-list nil) | 587 (defvar timeclock-project-list nil) |