Skip to content

Instantly share code, notes, and snippets.

@kencoba
Created February 4, 2014 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kencoba/8798800 to your computer and use it in GitHub Desktop.
Save kencoba/8798800 to your computer and use it in GitHub Desktop.
曜日を調べるのが面倒。 ref: http://qiita.com/kencoba/items/e2b96f208097bd0e50ba
(defun format-specific-day (ymd)
"insert month,day and day of the week"
(interactive "syyyy-mm-dd: ")
(when (string-match "^\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)$" ymd)
(let ((yy (string-to-number (match-string 1 ymd)))
(mm (string-to-number (match-string 2 ymd)))
(dd (string-to-number (match-string 3 ymd))))
(insert (format-time-string "%m月%d日(%a)"
(encode-time 0 0 0 dd mm yy nil 0))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment