Friday, September 17, 2010

Re: how to do datetime arithmetic in vimscript?

hsitz wrote:
> What is best solution for doing date and datetime arithmetic in
> vimscript? It seems reltime() doesn't provide enough to do much.
>
[snip]

There's calutil.vim, which works with date arithmetic:

calutil#Cal2Jul(y,m,d) converts year-month-day to julian day
(proleptic for dates prior to 9/14/1752)
calutil#Jul2Cal(julday,mode) converts julian day to year-month-day,
month-day-year,day-month-year

You can get it at:

http://mysite.verizon.net/astronaut/vim/index.html#CALUTIL

Regards,
Chip Campbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment