This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Date operation

5 posts · 1199 views

Hello all!

I have a problem, I've date in this form: @2010-12-29T17:05:43.000000+01:00

How can I add, for example, 10 days?

Thanks, bye

Re: Date operation

So I guess your using the local-time package then? Try:
(timestamp+ date 10 :day)
Need an online wiki database? My Lisp startup http://www.formlis.com combines a wiki with forms and reports.

Re: Date operation

Thanks for reply.
Yes I use local-time package, this fn:
(local-time::universal-to-timestamp (get-universal-time))
The fn (timestamp...) don't work :( .

Thanks very much,

bye

UPDATE:I solve so:
(local-time::timestamp+ (local-time::universal-to-timestamp (get-universal-time)) 10 :day)

Thanks very much :)

Re: Date operation

In this case he is using a library of time & date routines that store time in a specialized structure (basically just two unsigned 32's).

Read Eric Naggum's The Long, Painful History of Time for the 'why' of it.
Need an online wiki database? My Lisp startup http://www.formlis.com combines a wiki with forms and reports.