Created
February 4, 2014 05:58
-
-
Save kencoba/8798800 to your computer and use it in GitHub Desktop.
曜日を調べるのが面倒。 ref: http://qiita.com/kencoba/items/e2b96f208097bd0e50ba
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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