대문 최근에 바뀐 글 새소식 찾기 하우투 문제 제안

InsertAnyDate

최근 편집

요약: Add actual insert-any-date command that uses calendar-read-date.

변경됨:

< (defun insdate-insert-any-date (&optional days)

(으)로

>
> (defun insdate-insert-any-date (date)
> "Insert DATE using the current locale."
> (interactive (list (calendar-read-date)))
> (insert (calendar-date-string date)))
>
> (defun insdate-insert-date-from
(&optional days)
> "Insert date that is DAYS from current."


Instead of InsertingTodaysDate, the following command takes a UniversalArgument that will insert the day ‘days’ from the current date.

  (require 'calendar)
  
  (defun insdate-insert-any-date (date)
    "Insert DATE using the current locale."
    (interactive (list (calendar-read-date)))
    (insert (calendar-date-string date)))
  
  (defun insdate-insert-date-from (&optional days)
    "Insert date that is DAYS from current."
    (interactive "p*")
    (insert
     (calendar-date-string
      (calendar-gregorian-from-absolute
       (+ (calendar-absolute-from-gregorian (calendar-current-date))
	  days)))))

See InsertingAndUpdatingDates for other ways to insert dates in buffers and files.


CategoryCalendar CategoryEditing