Skip to content

Show calendar week number #137

@TauPan

Description

@TauPan

e.g. something like ' 2021 / November 15 - 21 - Week 46' in the title of the week view.

Or similar to calendar-intermonth-text set to

(propertize
 (format "%2d"
         (car
          (calendar-iso-from-absolute
           (calendar-absolute-from-gregorian
            (list month day year)))))
 'font-lock-face 'calendar-iso-week-face)

Which displays the week number in front of the days row.

Example M-x calendar result without font locking:

        September 2021            October 2021            November 2021    
  KW Mo Tu We Th Fr Sa Su  KW Mo Tu We Th Fr Sa Su  KW Mo Tu We Th Fr Sa Su 
  35        1  2  3  4  5  39              1  2  3  44  1  2  3  4  5  6  7 
  36  6  7  8  9 10 11 12  40  4  5  6  7  8  9 10  45  8  9 10 11 12 13 14 
  37 13 14 15 16 17 18 19  41 11 12 13 14 15 16 17  46 15 16 17 18 19 20 21 
  38 20 21 22 23 24 25 26  42 18 19 20 21 22 23 24  47 22 23 24 25 26 27 28 
  39 27 28 29 30           43 25 26 27 28 29 30 31  48 29 30 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions