r1245 - in /trunk/packages/vim-scripts: debian/changelog debian/vim-scripts.status html/index.html html/plugin_calendar.vim.html plugin/calendar.vim

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Tue Apr 8 21:13:18 UTC 2008


Author: jamessan
Date: Tue Apr  8 21:13:18 2008
New Revision: 1245

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1245
Log:
Update calendar

Modified:
    trunk/packages/vim-scripts/debian/changelog
    trunk/packages/vim-scripts/debian/vim-scripts.status
    trunk/packages/vim-scripts/html/index.html
    trunk/packages/vim-scripts/html/plugin_calendar.vim.html
    trunk/packages/vim-scripts/plugin/calendar.vim

Modified: trunk/packages/vim-scripts/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/changelog?rev=1245&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/changelog (original)
+++ trunk/packages/vim-scripts/debian/changelog Tue Apr  8 21:13:18 2008
@@ -8,7 +8,7 @@
       (Closes: #465330)
   * Updated addons:
     - xmledit, surround, debPlugin, Markdown syntax, NERD Commenter, Enhanced
-      Commentify, vcscommand.
+      Commentify, vcscommand, calendar.
   * New addons:
     - DetectIndent: Automatically detect indent settings. (Closes: #471890)
 

Modified: trunk/packages/vim-scripts/debian/vim-scripts.status
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/debian/vim-scripts.status?rev=1245&op=diff
==============================================================================
--- trunk/packages/vim-scripts/debian/vim-scripts.status (original)
+++ trunk/packages/vim-scripts/debian/vim-scripts.status Tue Apr  8 21:13:18 2008
@@ -92,7 +92,7 @@
 email:       mattn_jp at mail.goo.ne.jp
 license:     no license
 disabledby:  let loaded_calendar = 1
-version:     1.6
+version:     1.7
 
 script_name: plugin/winmanager.vim
 addon:       winmanager

Modified: trunk/packages/vim-scripts/html/index.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/index.html?rev=1245&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/index.html (original)
+++ trunk/packages/vim-scripts/html/index.html Tue Apr  8 21:13:18 2008
@@ -49,7 +49,7 @@
    <li><a href="syntax_mkd.vim.html">syntax/mkd.vim.html</a></li>
   </ul>
   <p>
-  Page generated on Tue, 08 Apr 2008 16:51:55 -0400
+  Page generated on Tue, 08 Apr 2008 17:12:45 -0400
 .
   </p>
  </body>

Modified: trunk/packages/vim-scripts/html/plugin_calendar.vim.html
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/html/plugin_calendar.vim.html?rev=1245&op=diff
==============================================================================
--- trunk/packages/vim-scripts/html/plugin_calendar.vim.html (original)
+++ trunk/packages/vim-scripts/html/plugin_calendar.vim.html Tue Apr  8 21:13:18 2008
@@ -153,8 +153,8 @@
 <tr>
   <td class="lightbg"><b>&nbsp;script karma&nbsp;</b></td>
   <td>
-    Rating <b>1111/455</b>,
-    Downloaded by 18192  </td>
+    Rating <b>1147/470</b>,
+    Downloaded by 19392  </td>
 </tr>
 </table>
 <p>
@@ -204,36 +204,44 @@
     <th valign="top">release notes</th>
 </tr>
 <tr>
-        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=7409">calendar.vim</a></td>
-    <td class="rowodd" valign="top" nowrap><b>1.6</b></td>
-    <td class="rowodd" valign="top" nowrap><i>2007-07-24</i></td>
+        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=8279">calendar.vim</a></td>
+    <td class="rowodd" valign="top" nowrap><b>1.7</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2008-02-15</i></td>
     <td class="rowodd" valign="top" nowrap>6.0</td>
     <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=103">Yasuhiro Matsumoto</a></i></td>
-    <td class="rowodd" valign="top" width="2000">Added new actions 'calendar_begin' and 'calenader_end'.</td>
-</tr>
-<tr>
-        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=7047">calendar.vim</a></td>
-    <td class="roweven" valign="top" nowrap><b>1.5</b></td>
-    <td class="roweven" valign="top" nowrap><i>2007-05-01</i></td>
+    <td class="rowodd" valign="top" width="2000">This is a fixed version of calendar.vim. fixed problem of week number on 03/01/2008.</td>
+</tr>
+<tr>
+        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=7409">calendar.vim</a></td>
+    <td class="roweven" valign="top" nowrap><b>1.6</b></td>
+    <td class="roweven" valign="top" nowrap><i>2007-07-24</i></td>
     <td class="roweven" valign="top" nowrap>6.0</td>
     <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=103">Yasuhiro Matsumoto</a></i></td>
-    <td class="roweven" valign="top" width="2000">This is an upgrade for calendar.vim. this include some bug fix.</td>
-</tr>
-<tr>
-        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=4984">calendar.vim</a></td>
-    <td class="rowodd" valign="top" nowrap><b>1.4a</b></td>
-    <td class="rowodd" valign="top" nowrap><i>2006-01-16</i></td>
+    <td class="roweven" valign="top" width="2000">Added new actions 'calendar_begin' and 'calenader_end'.</td>
+</tr>
+<tr>
+        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=7047">calendar.vim</a></td>
+    <td class="rowodd" valign="top" nowrap><b>1.5</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2007-05-01</i></td>
     <td class="rowodd" valign="top" nowrap>6.0</td>
     <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=103">Yasuhiro Matsumoto</a></i></td>
-    <td class="rowodd" valign="top" width="2000">This is an upgrade for calendar.vim. this include some bug fix and calendar_today action.
<br></td>
-</tr>
-<tr>
-        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=3599">calendar.vim</a></td>
-    <td class="roweven" valign="top" nowrap><b>1.4</b></td>
-    <td class="roweven" valign="top" nowrap><i>2004-11-03</i></td>
+    <td class="rowodd" valign="top" width="2000">This is an upgrade for calendar.vim. this include some bug fix.</td>
+</tr>
+<tr>
+        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=4984">calendar.vim</a></td>
+    <td class="roweven" valign="top" nowrap><b>1.4a</b></td>
+    <td class="roweven" valign="top" nowrap><i>2006-01-16</i></td>
     <td class="roweven" valign="top" nowrap>6.0</td>
     <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=103">Yasuhiro Matsumoto</a></i></td>
-    <td class="roweven" valign="top" width="2000">This is an upgrade for Calendar.vim. this include 2 bug fixs and 1 improvement.</td>
+    <td class="roweven" valign="top" width="2000">This is an upgrade for calendar.vim. this include some bug fix and calendar_today action.
<br></td>
+</tr>
+<tr>
+        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=3599">calendar.vim</a></td>
+    <td class="rowodd" valign="top" nowrap><b>1.4</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2004-11-03</i></td>
+    <td class="rowodd" valign="top" nowrap>6.0</td>
+    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=103">Yasuhiro Matsumoto</a></i></td>
+    <td class="rowodd" valign="top" width="2000">This is an upgrade for Calendar.vim. this include 2 bug fixs and 1 improvement.</td>
 </tr>
 </table>
 <!-- finish off the framework -->
@@ -279,8 +287,7 @@
           </td>
 
     <td align="right" valign="top">
-      	<a href="http://www.webconceptgroup.net"><img src="/images/logo_sponsor_wcg.jpg" width="131" height="30" border="0" alt="Sponsored by Web Concept Group Inc."></a>
-	<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
+      		<a href="http://sourceforge.net" rel="nofollow"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
     </td>
 
     <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>

Modified: trunk/packages/vim-scripts/plugin/calendar.vim
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim-scripts/plugin/calendar.vim?rev=1245&op=diff
==============================================================================
--- trunk/packages/vim-scripts/plugin/calendar.vim (original)
+++ trunk/packages/vim-scripts/plugin/calendar.vim Tue Apr  8 21:13:18 2008
@@ -2,9 +2,10 @@
 " What Is This: Calendar
 " File: calendar.vim
 " Author: Yasuhiro Matsumoto <mattn.jp at gmail.com>
-" Last Change: Wed, 25 Jul 2007
-" Version: 1.6
+" Last Change: Fri, 15 Feb 2008
+" Version: 1.7
 " Thanks:
+"     Per Winkvist                  : bug fix
 "     Serge (gentoosiast) Koksharov : bug fix
 "     Vitor Antunes                 : bug fix
 "     Olivier Mengue                : bug fix
@@ -52,11 +53,12 @@
 "     <Leader>ch
 "       show horizontal calendar ...
 " ChangeLog:
+"     1.7  : bug fix, week number was broken on 2008.
 "     1.6  : added calendar_begin action.
 "            added calendar_end action.
 "     1.5  : bug fix, fixed ruler formating with strpart.
 "            bug fix, using winfixheight.
-"     1.4a : bug fix, week numbenr was broken on 2005.
+"     1.4a : bug fix, week number was broken on 2005.
 "            added calendar_today action.
 "            bug fix, about wrapscan.
 "            bug fix, about today mark.
@@ -301,7 +303,7 @@
 "       :echo calendar_version
 " GetLatestVimScripts: 52 1 :AutoInstall: calendar.vim
 
-let g:calendar_version = "1.6"
+let g:calendar_version = "1.7"
 if &compatible
   finish
 endif
@@ -503,7 +505,7 @@
   "+++ ready for build
   "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   " remember today
-  " divide strftime('%d') by 1 so as to get "1, 2,3 .. 9" instead of "01, 02, 03 .. 09"
+  " divide strftime('%d') by 1 so as to get "1,2,3 .. 9" instead of "01, 02, 03 .. 09"
   let vtoday = strftime('%Y').strftime('%m').strftime('%d')
 
   " get arguments
@@ -556,76 +558,84 @@
     " set boundary of the month
     if vmnth == 1
       let vmdays = 31
-      let vparam = 0
+      let vparam = 1
       let vsmnth = 'Jan'
     elseif vmnth == 2
       let vmdays = 28
-      let vparam = 31
+      let vparam = 32
       let vsmnth = 'Feb'
     elseif vmnth == 3
       let vmdays = 31
-      let vparam = 59
+      let vparam = 60
       let vsmnth = 'Mar'
     elseif vmnth == 4
       let vmdays = 30
-      let vparam = 90
+      let vparam = 91
       let vsmnth = 'Apr'
     elseif vmnth == 5
       let vmdays = 31
-      let vparam = 120
+      let vparam = 121
       let vsmnth = 'May'
     elseif vmnth == 6
       let vmdays = 30
-      let vparam = 151
+      let vparam = 152
       let vsmnth = 'Jun'
     elseif vmnth == 7
       let vmdays = 31
-      let vparam = 181
+      let vparam = 182
       let vsmnth = 'Jul'
     elseif vmnth == 8
       let vmdays = 31
-      let vparam = 212
+      let vparam = 213
       let vsmnth = 'Aug'
     elseif vmnth == 9
       let vmdays = 30
-      let vparam = 243
+      let vparam = 244
       let vsmnth = 'Sep'
     elseif vmnth == 10
       let vmdays = 31
-      let vparam = 273
+      let vparam = 274
       let vsmnth = 'Oct'
     elseif vmnth == 11
       let vmdays = 30
-      let vparam = 304
+      let vparam = 305
       let vsmnth = 'Nov'
     elseif vmnth == 12
       let vmdays = 31
-      let vparam = 334
+      let vparam = 335
       let vsmnth = 'Dec'
     else
       echo 'Invalid Year or Month'
       return
     endif
+    if vyear % 400 == 0
+      if vmnth == 2
+        let vmdays = 29
+      elseif vmnth >= 3
+        let vparam = vparam + 1
+      endif
+    elseif vyear % 100 == 0
+      if vmnth == 2
+        let vmdays = 28
+      endif
+    elseif vyear % 4 == 0
+      if vmnth == 2
+        let vmdays = 29
+      elseif vmnth >= 3
+        let vparam = vparam + 1
+      endif
+    endif
 
     " calc vnweek of the day
     if vnweek == -1
-      let vnweek = ( vyear * 365 ) + vparam + 1
+      let vnweek = ( vyear * 365 ) + vparam
       let vnweek = vnweek + ( vyear/4 ) - ( vyear/100 ) + ( vyear/400 )
-      if vmnth < 3 && vyear % 4 == 0
+      if vyear % 4 == 0
         if vyear % 100 != 0 || vyear % 400 == 0
           let vnweek = vnweek - 1
         endif
       endif
       let vnweek = vnweek - 1
-    endif
-    if vmnth == 2
-      if vyear % 400 == 0
-        let vmdays = 29
-      elseif vyear % 100 == 0
-        let vmdays = 28
-      elseif vyear % 4 == 0
-        let vmdays = 29
-      endif
     endif
 
     " fix Gregorian
@@ -643,8 +653,8 @@
       let vnweek = vnweek - 1
     elseif exists('g:calendar_weeknm')
       " if given g:calendar_weeknm, show week number(ref:ISO8601)
-      let viweek = (vparam + 1) / 7
-      let vfweek = (vparam + 1) % 7
+      let viweek = vparam / 7
+      let vfweek = vparam % 7
       if vnweek == 0
         let vfweek = vfweek - 7
         let viweek = viweek + 1
@@ -669,9 +679,6 @@
         endif
       endif
       let vcolumn = vcolumn + 5
-      if ((vyear % 4 == 0 && vmnth >= 3) || (vyear-1) % 4 == 0)
-        let viweek = viweek + 1
-      endif
     endif
 
     "--------------------------------------------------------------
@@ -1215,6 +1222,8 @@
 "*----------------------------------------------------------------
 "*****************************************************************
 function! s:CalendarHelp()
+  echohl None
+  echo 'Calendar version ' . g:calendar_version
   echohl SpecialKey
   echo '<s-left>  : goto prev month'
   echo '<s-right> : goto next month'




More information about the pkg-vim-maintainers mailing list