Re: How to just show the Year
Steven Scott <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Error Message: Expected method. date?string evaluated instead to freemarker.template.SimpleScalar on line 8, column 16 in Templates/Scripting/EmptyPHP.php. On Tue, Aug 24, 2010 at 12:49 PM, Daniel Dekany <[email protected]> wrote: > 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 > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user > ------------------------------------------------------------------------------ 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 _______________________________________________ FreeMarker-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-user