[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

icalendar--datetime-to-iso-date (icalendar.el)

From: HASM
Subject: icalendar--datetime-to-iso-date (icalendar.el)
Date: Thu, 03 Nov 2016 06:27:00 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Shouldn't format in:
  icalendar--datetime-to-iso-date (icalendar.el)
instead of:

At least that's how I read the wikipedia description of the standard:

This will allow, for those of use ISO dates with:
   diary-date-forms    diary-iso-date-forms
   calendar-date-style 'iso
To create a "simple' sort function for the diary, like the one below.



(defun sort--diary (diary-filename)
    (set-buffer (find-file-noselect (expand-file-name diary-filename)))
    (goto-char (point-min))
    (while (search-forward "\C-j " nil t)
      (replace-match "^j "))
    (sort-lines nil (point-min) (point-max))
    (goto-char (point-min))
    (while (search-forward "^j" nil t)
      (replace-match "\C-j"))

(defvar sort--diary-filename (expand-file-name diary-file)
  "History for sort--diary diary-filename")

(defun sort-diary (diary-filename)
  "Sort diary file.  Requires dates to use ISO standard"
  (interactive (list (read-from-minibuffer
                      "diary file name: "
                      (car sort--diary-filename)
                      nil nil 'sort--diary-filename)))
  (sort--diary diary-filename))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]