Add tags

Add tags to the following comment
日曜が週の始まりと考えました。
(week-days 2007 7 6)
=>("2007/07/02(月)" "2007/07/03(火)" "2007/07/04(水)" "2007/07/05(木)" "2007/07/06(金)")
(week-days 2007 7 31)
=>("2007/07/30(月)" "2007/07/31(火)" "2007/08/01(水)" "2007/08/02(木)" "2007/08/03(金)")
(week-days 2007 12 30)
=>("2007/12/31(月)" "2008/01/01(火)" "2008/01/02(水)" "2008/01/03(木)" "2008/01/04(金)")
1
2
3
4
5
6
(defun week-days (y m d)
  (let ((dow (nth 6 (decode-time (encode-time 0 0 0 d m y)))))
    (mapcar (lambda (x)
              (format-time-string "%Y/%m/%d(%a)"
                                  (encode-time 0 0 0 (- d dow (- x)) m y)))
            '(1 2 3 4 5))))

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...