6/12/2023 0 Comments Calendar 2015 with week numberGoogle Calendar on the web uses ISO numbering (The Windows 10 Calendar desktop app actually lets you pick). Google Calendar on my android uses the nonstandard "week containing Jan 1 = week 1" numbering, as does Samsung Calendar. (calendar-insert-indented "" indent))))) Go to proper spotI've noticed the same thing. (calendar-for-loop i from 1 to blank-days do (insert " ")) Add blank days before the first of the month + 2 Use 2nd day if 1st day of calendar month is Sunday. + ( if (and (= 0 blank-days) (= 0 calendar-week-start-day)) + (calendar-iso-week-string Insert ISO week number. + (calendar-insert-indented Go to proper spot (calendar-insert-indented "" indent) Go to proper spot (calendar-insert-indented "" 0 t) Force onto following line (autoload 'calendar-goto-islamic-date "cal-islam" "Move cursor to Islamic -2141,8 +2145,15 string 2) +(autoload 'calendar-iso-week-string "cal-iso") +(autoload 'calendar-iso-from-absolute "cal-iso") +++ -1810,6 +1810,10 'calendar-iso-date-string "cal-iso" "String of ISO date of Gregorian date.") (format "ISO date: %s" (calendar-iso-date-string date))) "ISO calendar equivalent of date diary entry." + (calendar-absolute-from-gregorian date))))) + "String of ISO week number of Gregorian DATE." +( defun calendar-iso-week-string ( &optional date) Whether it affects negatively other features and functions of Emacs’s Calendar/Diary are also unknown. Its accuracy in producing week numbers for calendar months has only been reviewed back to 2004. It has only been tested for the US-English settings of ‘M-x calendar’ using the assumption that Sunday is the first day of the week. The use of “W52” at the beginning of the week may be easier to read than the format of calendar-hack.el. Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Here’s another patch to Emacs 22 () that provides the following view of the calendar: May 2007 June 2007 July 2007 It’s also possible to display week numbers in the calendar on GnuEmacs 22, see e.g.) However, EdwardReingold, the author of the CalendarMode, has stated many times, that this is not recommended since it can break things. Support for ISO weeks in older versions of GnuEmacs To display a given ISO week in Calendar use the command calendar-iso-goto-week, which is bound to g The smaller height property, though, throws the alignment of the calendar off, so I prefer using a different color for the week number: (set-face-attribute 'calendar-iso-week-face nil 'font-lock-face 'calendar-iso-week-header-face)) (set-face-attribute 'calendar-iso-week-header-face nil One can also add a header for the week numbers: (copy-face 'default 'calendar-iso-week-header-face) This will display the week number in a somewhat (the factor 0.7 above) smaller font. 'font-lock-face 'calendar-iso-week-face)) (calendar-absolute-from-gregorian (list month day year))))) (set-face-attribute 'calendar-iso-week-face nil The code bellow was adapted from this variable’s documentation: (copy-face font-lock-constant-face 'calendar-iso-week-face) GnuEmacs 23.1 introduced the variable calendar-intermonth-text that can be used for displaying ISO week numbers in the Calendar window. Displaying ISO week numbers in CalendarMode GnuEmacs has support for displaying ISO weeks ( WikiPedia : ISO_week_date) in CalendarMode since version 23.
0 Comments
Leave a Reply. |