Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun my-insert-dates ()
- "insert a bunch of dates"
- (interactive)
- (let* ((month 3)
- (day 1)
- (time (encode-time 1 1 0 day month 2009)))
- (while (= (nth 4 (decode-time time)) month)
- (insert (format-time-string "%D %a:n" time))
- (setq day (1+ day))
- (setq time (encode-time 1 1 0 day month 2009)))))
- (require 'calendar)
- (defun display-a-month (day month year)
- (insert (format "%sn" (calendar-date-string (list month day year))))
- (if (< day 30)
- (display-a-month (+ day 1) month year)))
- (defun my-insert-dates ()
- "insert the first day of each month"
- (interactive)
- (dotimes (mo 12)
- (insert (format-time-string "%D %a:n" (encode-time 1 1 0 1 (1+ mo) 2009)))))
Add Comment
Please, Sign In to add comment