Emacs Lisp
■ このスレッドは過去ログ倉庫に格納されています
0216デフォルトの名無しさん
NGNG私なら…
1. (nth 6 (decode-time)) で今日の曜日を取得
2. 先週の月曜日が何日前になるかを算出
3. (decode-time) の DAY を n 日前にして encode-time
;; DAY が 0以下でもちゃんと処理してくれる:-)
必要に応じてまた `decode-time' するなり、`format-time-string' なり。
calendar 使うなら…
(calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
1
(- (calendar-absolute-from-gregorian (calendar-current-date)) 7)))
■ このスレッドは過去ログ倉庫に格納されています