You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Thomas Foster <TH...@uk.ibm.com> on 2007/08/09 12:43:11 UTC
Velocity date function??
Hi,
I am wanting to write a macro to use in Atlassian Confluence. It basically
provides a list of links to the past 12 months of news (each month having
its own link).
E.g.
August 2007
July 2007
June 2007
May 2007
...
However I want the macro to be automated so that when, for example, it
turns to september 2007, it will automatically add the link for that month
and remove the previous september 2006 link. I've never used Velocity
before but I have had a quick look at the documentation. But what i was
wondering is, is there a function in Velocity which provides the current
date?? If not, are there any tips or features which could help me create
this macro?
Thank you for your time,
Tom
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Re: Velocity date function??
Posted by Nathan Bubna <nb...@gmail.com>.
Velocity doesn't provide access to the current date automatically.
However, the VelocityTools project does have a DateTool which can do
that and much more for you. You can just add an instance of it to the
context.
http://velocity.apache.org/tools/devel/generic/
On 8/9/07, Thomas Foster <TH...@uk.ibm.com> wrote:
> Hi,
>
> I am wanting to write a macro to use in Atlassian Confluence. It basically
> provides a list of links to the past 12 months of news (each month having
> its own link).
> E.g.
>
> August 2007
> July 2007
> June 2007
> May 2007
> ...
>
> However I want the macro to be automated so that when, for example, it
> turns to september 2007, it will automatically add the link for that month
> and remove the previous september 2006 link. I've never used Velocity
> before but I have had a quick look at the documentation. But what i was
> wondering is, is there a function in Velocity which provides the current
> date?? If not, are there any tips or features which could help me create
> this macro?
>
> Thank you for your time,
>
> Tom
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org