emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Trevor Murphy <trevor.m.murphy@gmail.com>
To: emacs-orgmode@gnu.org
Cc: n.goaziou@gmail.com
Subject: [PATCH v2] Timestamps: Handle sub-10-min ranges when updating timestamps
Date: Thu,  8 Aug 2013 16:30:37 -0700	[thread overview]
Message-ID: <1376004637-13354-1-git-send-email-trevor.m.murphy@gmail.com> (raw)

* lisp/org.el (org-get-compact-tod): Always pad minutes to two places.

TINYCHANGE
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index b1a2fa8..e13c2b8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16077,7 +16077,7 @@ with the current time without prompting the user."
 	(setq dh (- h2 h1) dm (- m2 m1))
 	(if (< dm 0) (setq dm (+ dm 60) dh (1- dh)))
 	(concat t1 "+" (number-to-string dh)
-		(if (/= 0 dm) (concat ":" (number-to-string dm))))))))
+		(and (/= 0 dm) (format ":%02d" dm)))))))
 
 (defun org-time-stamp-inactive (&optional arg)
   "Insert an inactive time stamp.
--
1.8.3.4

             reply	other threads:[~2013-08-08 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08 23:30 Trevor Murphy [this message]
2013-08-10  8:16 ` [PATCH v2] Timestamps: Handle sub-10-min ranges when updating timestamps Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376004637-13354-1-git-send-email-trevor.m.murphy@gmail.com \
    --to=trevor.m.murphy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).