diff options
| author | Richard M. Stallman | 1996-11-05 18:27:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-11-05 18:27:41 +0000 |
| commit | b24173f7679956f32255602bbad2a1b4072a2cda (patch) | |
| tree | fb0ee06340c3eb4179a18392f4ba57c7a82222e2 | |
| parent | 216f116990d070b4390d8346d69cdeea0805e5ed (diff) | |
| download | emacs-b24173f7679956f32255602bbad2a1b4072a2cda.tar.gz emacs-b24173f7679956f32255602bbad2a1b4072a2cda.zip | |
(time-stamp-dd/mm/yyyy): New function.
| -rw-r--r-- | lisp/time-stamp.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index 6c65715f456..9d4c45037a1 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | ;; Originally based on the 19 Dec 88 version of | 40 | ;; Originally based on the 19 Dec 88 version of |
| 41 | ;; date.el by John Sturdy <mcvax!harlqn.co.uk!jcgs@uunet.uu.net> | 41 | ;; date.el by John Sturdy <mcvax!harlqn.co.uk!jcgs@uunet.uu.net> |
| 42 | ;; Version 2, January 1995: replaced functions with %-escapes | 42 | ;; Version 2, January 1995: replaced functions with %-escapes |
| 43 | ;; $Id: time-stamp.el,v 1.5 1996/08/13 18:03:17 gildea Exp $ | 43 | ;; $Id: time-stamp.el,v 1.19 1996/09/22 22:20:58 kwzh Exp rms $ |
| 44 | 44 | ||
| 45 | ;;; Code: | 45 | ;;; Code: |
| 46 | 46 | ||
| @@ -463,6 +463,14 @@ around literals." | |||
| 463 | (string-to-int (substring date 8 10)) | 463 | (string-to-int (substring date 8 10)) |
| 464 | (substring date -4)))) | 464 | (substring date -4)))) |
| 465 | 465 | ||
| 466 | (defun time-stamp-dd/mm/yyyy () | ||
| 467 | "Return the current date as a string in \"DD/MM/YYYY\" form." | ||
| 468 | (let ((date (current-time-string))) | ||
| 469 | (format "%02d/%02d/%s" | ||
| 470 | (string-to-int (substring date 8 10)) | ||
| 471 | (cdr (assoc (substring date 4 7) time-stamp-month-numbers)) | ||
| 472 | (substring date -4) ))) | ||
| 473 | |||
| 466 | ;;; same as __DATE__ in ANSI C | 474 | ;;; same as __DATE__ in ANSI C |
| 467 | 475 | ||
| 468 | (defun time-stamp-mon-dd-yyyy () | 476 | (defun time-stamp-mon-dd-yyyy () |