40-calendar.el 911 Bytes
Newer Older
1
2
3
4
5
6
;;; ~/.emacs.d/40-calendar.el -- tweak calendar-mode to taste
;;;  Copyright (C) 2017  Olaf Meeuwissen
;;;
;;;  License: GPL-3.0+

(use-package calendar
7
8
9
10
11
  :bind (:map calendar-mode-map
              ("<M-S-left>"  . calendar-backward-month)
              ("<M-S-right>" . calendar-forward-month)
              ("<M-S-up>"    . calendar-backward-year)
              ("<M-S-down>"  . calendar-forward-year))
12
13
14
15
16
17
18
19
20
21
22
  :init
  (setq calendar-week-start-day    1    ; 0 == Sunday
        calendar-date-style       'iso
        abbreviated-calendar-year 'nil)
  (setq calendar-date-display-form
        '((format "%s-%.2d-%.2d"
                  year (string-to-number month) (string-to-number day))
          (if dayname (format " %s" (substring dayname 0 3)))))
  (setq calendar-time-display-form
      '(24-hours ":" minutes            ; both always two digits
                 (if time-zone (format "+%s" time-zone)))))