how to calculate a future date

Author Message

Jacks JNK

Monday 12 January 2009 11:39:37 pm

how to calculate a future date at a fixed date?
Example: we are on 23 January 2009 and I want to automatically calculate the date after 2 weeks. What to do?

Skype : jacks_ngala

Kristof Coomans

Tuesday 13 January 2009 2:44:37 am

You can use eZDate::adjustDate().

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Jacks JNK

Tuesday 13 January 2009 4:27:57 am

Can you be clear please ?

Skype : jacks_ngala

Kristof Coomans

Tuesday 13 January 2009 5:22:15 am

I assumed you wanted to know how to do this in PHP code, since you also weren't clear in which language you wanted to accomplish this :)

In template code, you'll have to use the date/time related template operators, gettime() and maketime() or makedate(). They are documented here http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_operators/miscellaneous. Good luck!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.