summaryrefslogtreecommitdiff
path: root/lisp/time-stamp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-11-05 18:27:41 +0000
committerRichard M. Stallman <rms@gnu.org>1996-11-05 18:27:41 +0000
commitb24173f7679956f32255602bbad2a1b4072a2cda (patch)
treefb0ee06340c3eb4179a18392f4ba57c7a82222e2 /lisp/time-stamp.el
parent216f116990d070b4390d8346d69cdeea0805e5ed (diff)
downloademacs-b24173f7679956f32255602bbad2a1b4072a2cda.tar.gz
(time-stamp-dd/mm/yyyy): New function.
Diffstat (limited to 'lisp/time-stamp.el')
-rw-r--r--lisp/time-stamp.el10
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 @@
;; Originally based on the 19 Dec 88 version of
;; date.el by John Sturdy <mcvax!harlqn.co.uk!jcgs@uunet.uu.net>
;; Version 2, January 1995: replaced functions with %-escapes
-;; $Id: time-stamp.el,v 1.5 1996/08/13 18:03:17 gildea Exp $
+;; $Id: time-stamp.el,v 1.19 1996/09/22 22:20:58 kwzh Exp rms $
;;; Code:
@@ -463,6 +463,14 @@ around literals."
(string-to-int (substring date 8 10))
(substring date -4))))
+(defun time-stamp-dd/mm/yyyy ()
+ "Return the current date as a string in \"DD/MM/YYYY\" form."
+ (let ((date (current-time-string)))
+ (format "%02d/%02d/%s"
+ (string-to-int (substring date 8 10))
+ (cdr (assoc (substring date 4 7) time-stamp-month-numbers))
+ (substring date -4) )))
+
;;; same as __DATE__ in ANSI C
(defun time-stamp-mon-dd-yyyy ()