Forráskód Böngészése

Clocktables: Fix display of ISO week.

David Bremner writes:

    I have a clocktable that begins like this.

    #+BEGIN: clocktable :maxlevel 2 :block 2009-W05 :scope agenda-with-archives
    Clock summary at [2009-01-27 Tue 17:15], for week 2009-W04.

    [contents snipped]

    #+END:

    Whatever week I put in :block, it puts one less in the title.  It
    seems actually gather the clock data from the right week, but the
    title is wrong?  Or I misunderstand something as usual :-).

There was a problem wit the week starting date.
Carsten Dominik 16 éve
szülő
commit
a89bbe5cab
2 módosított fájl, 4 hozzáadás és 0 törlés
  1. 3 0
      lisp/ChangeLog
  2. 1 0
      lisp/org-clock.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-01-28  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-clock.el (org-clock-special-range): Fix week display in
+	clock tables.
+
 	* org-exp.el (org-get-current-options): Fix bug when in indirect
 	buffer.
 

+ 1 - 0
lisp/org-clock.el

@@ -724,6 +724,7 @@ the returned times will be formatted strings."
       (setq date (calendar-gregorian-from-absolute
 		  (calendar-absolute-from-iso (list w 1 y))))
       (setq d (nth 1 date) month (car date) y (nth 2 date)
+	    dow 1
 	    key 'week))
      ((string-match "^\\([0-9]+\\)-\\([0-9]\\{1,2\\}\\)-\\([0-9]\\{1,2\\}\\)$" skey)
       (setq y (string-to-number (match-string 1 skey))