sunlabs.brazil.sunlabs
Class DateTemplate

java.lang.Object
  extended by sunlabs.brazil.template.Template
      extended by sunlabs.brazil.sunlabs.DateTemplate (view source)
All Implemented Interfaces:
TemplateInterface

public class DateTemplate
extends Template

Template for doing date and time calculations and formatting.

    <date format="strftime style date string" 
             ?time=nnn? ?zone=nnn? ?scan="xxx"? ?set="xxx"? >
 
format
A "strftime" style date string (defaults to "%D %T").
time
Number of seconds since the epoc (defaults to now);
ms
Number of ms since the epoc (if time is not specified)
scan
A human readable date string to use. time is used for relative dates. If not specified, time or ms are used as the time. The algorithm (and implementation) was borrowed from the TCL "clock scan" command.
zone
If specified, then the specified timezone is used. GMT is used for unrecognized zones. Oherwise the server's timezone is used. (Example: "GMT");
set
if specified, set the indicated variable with the result; do not substitute the result inline.
Variable substitutions of the for ${...} are permitted for the attributes.


Field Summary
 
Fields inherited from class sunlabs.brazil.template.Template
debug
 
Constructor Summary
DateTemplate()
           
 
Method Summary
 void tag_date(RewriteContext hr)
           
 
Methods inherited from class sunlabs.brazil.template.Template
done, init
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTemplate

public DateTemplate()
Method Detail

tag_date

public void tag_date(RewriteContext hr)

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.