emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: emacs-orgmode@gnu.org
Subject: Re: ascii-timestamps like 31.12.2021 to iso(org) format <2020-12-31> and back
Date: Fri, 31 Dec 2021 13:58:22 +0000	[thread overview]
Message-ID: <87bl0wj2pt.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87sfu8j4en.fsf@mat.ucm.es> (Uwe Brauer's message of "Fri, 31 Dec 2021 14:21:52 +0100")

On Friday, 31 Dec 2021 at 14:21, Uwe Brauer wrote:
> ⚠️ Caution: External sender
>
>
> Hi
>
> Does anybody know about a function that would convert between
> date format  like 31.12.2021 to  <2020-12-31> and back?

This is Emacs, of course, so you could use query-replace-regexp (M-%)
with, for instance

\([0-9][0-9]\)\.\([0-9][0-9]\)\.\([0-9]\{4\}\)

as the pattern to search for and

<\3-\2-\1>

as the replacement.  The converse is left as an exercise for the
reader. ;-)

-- 
: Eric S Fraga, with org release_9.5.2-289-gce75d2 in Emacs 29.0.50
: Latest paper written in org: https://arxiv.org/abs/2106.05096


  reply	other threads:[~2021-12-31 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31 13:21 ascii-timestamps like 31.12.2021 to iso(org) format <2020-12-31> and back Uwe Brauer
2021-12-31 13:58 ` Eric S Fraga [this message]
2021-12-31 16:05   ` Uwe Brauer
2021-12-31 16:40     ` Eric S Fraga
2022-01-04 10:00 ` Max Nikulin

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=87bl0wj2pt.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).