Re: How to just show the Year
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Tuesday, August 24, 2010, 6:23:17 PM, Steven Scott wrote:
> I am trying to create a PHP template in NetBeans 6.9.1, and I want
> to include a Copyright: 2010 (or the current year). I have the
> ${date} but I can not get just the year. This is what I have:
>
> Copyright ${date?string("yyyy")}
>
> I have also tried the
>
> <#setting short="yyyy">
> Copyright ${date?string.short}
>
> without any luck as well. Any help would be appreciated.
What's the error message? This should work as far as NetBeans put a
variable called "date" into the data-model (with other words, into the
template context) which is a java.util.Date.
--
Best regards,
Daniel Dekany
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d