Java Doc for DateTool.java in  » Template-Engine » Velocity » org » apache » velocity » tools » generic » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Template Engine » Velocity » org.apache.velocity.tools.generic 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.velocity.tools.generic.DateTool

DateTool
public class DateTool (Code)
Tool for working with Date and Calendar in Velocity templates. It is useful for accessing and formatting the "current" date as well as for formatting arbitrary Date and Calendar objects. Also the tool can be used to retrieve DateFormat instances or make conversions to and from various date types.

 Example of formatting the "current" date:
 $date                         -> Oct 19, 2003 9:54:50 PM
 $date.long                    -> October 19, 2003 9:54:50 PM PDT
 $date.medium_time             -> 9:54:50 PM
 $date.full_date               -> Sunday, October 19, 2003
 $date.get('default','short')  -> Oct 19, 2003 9:54 PM
 $date.get('yyyy-M-d H:m:s')   -> 2003-10-19 21:54:50
 Example of formatting an arbitrary date:
 $myDate                        -> Tue Oct 07 03:14:50 PDT 2003
 $date.format('medium',$myDate) -> Oct 7, 2003 3:14:50 AM
 Example toolbox.xml config (if you want to use this with VelocityView):
 <tool>
 <key>date</key>
 <scope>application</scope>
 <class>org.apache.velocity.tools.generic.DateTool</class>
 <parameter name="format" value="yyyy-M-d"/>
 </tool>
 

The methods of this tool are highly interconnected, and overriding key methods provides an easy way to create subclasses that use a non-default format, calendar, locale, or timezone.


author:
   Nathan Bubna
since:
   VelocityTools 1.0
version:
   $Revision: 493081 $ $Date: 2007-01-05 08:48:09 -0800 (Fri, 05 Jan 2007) $


Field Summary
final public static  StringDEFAULT_FORMAT
     The default format to be used when none is specified.
final public static  StringDEFAULT_FORMAT_KEY
     The key used for specifying a default format via toolbox params.

Constructor Summary
public  DateTool()
     Default constructor.

Method Summary
public  voidconfigure(Map params)
     Looks for a default format value in the given params.
public  Stringformat(Object obj)
     Converts the specified object to a date and formats it according to the pattern or style returned by DateTool.getFormat() .
public  Stringformat(String format, Object obj)
     Converts the specified object to a date and returns a formatted string representing that date in the locale returned by DateTool.getLocale() .
public  Stringformat(String format, Object obj, Locale locale)
     Converts the specified object to a date and returns a formatted string representing that date in the specified Locale .
public  Stringformat(String format, Object obj, Locale locale, TimeZone timezone)
     Returns a formatted string representing the specified date, Locale , and TimeZone .

The specified format may be a standard style pattern ('full', 'long', 'medium', 'short', or 'default').

You may also specify that you want only the date or time portion be appending '_date' or '_time' respectively to the standard style pattern. (e.g.

public  Stringformat(String dateStyle, String timeStyle, Object obj)
     Returns the specified date as a string formatted according to the specified date and/or time styles.
public  Stringformat(String dateStyle, String timeStyle, Object obj, Locale locale)
     Returns the specified date as a string formatted according to the specified Locale and date and/or time styles.
public  Stringformat(String dateStyle, String timeStyle, Object obj, Locale locale, TimeZone timezone)
     Returns the specified date as a string formatted according to the specified Locale and date and/or time styles.
public  Stringget(String format)
     Returns a formatted string representing the date returned by DateTool.getDate() .
public  Stringget(String dateStyle, String timeStyle)
     Returns a formatted string representing the date and/or time given by DateTool.getDate() in standard, localized patterns.
public  CalendargetCalendar()
     Returns a Calendar instance created using the timezone and locale returned by getTimeZone() and getLocale().
public  DategetDate()
    
public  DateFormatgetDateFormat(String format, Locale locale, TimeZone timezone)
     Returns a DateFormat instance for the specified format, Locale , and TimeZone .
public  DateFormatgetDateFormat(String dateStyle, String timeStyle, Locale locale, TimeZone timezone)
     Returns a DateFormat instance for the specified date style, time style, Locale , and TimeZone .
protected  DateFormatgetDateFormat(int dateStyle, int timeStyle, Locale locale, TimeZone timezone)
     Returns a DateFormat instance for the specified time style, date style, Locale , and TimeZone .
public  IntegergetDay()
     Returns the day (of the month) value of the date returned by DateTool.getCalendar() .

NOTE: Unlike java.util.Date, this returns the day of the month. It is equivalent to Date.getDate() and Calendar.get(Calendar.DAY_OF_MONTH).
public  IntegergetDay(Object date)
     Returns the day (of the month) value for the specified date.

NOTE: Unlike java.util.Date, this returns the day of the month. It is equivalent to Date.getDate() and Calendar.get(Calendar.DAY_OF_MONTH).
public  StringgetFormat()
     Return the pattern or style to be used for formatting dates when none is specified.
public  LocalegetLocale()
     This implementation returns the default locale.
public  IntegergetMonth()
     Returns the month value of the date returned by DateTool.getCalendar() .
public  IntegergetMonth(Object date)
     Returns the month value of the specified date.
protected  intgetStyleAsInt(String style)
     Checks a string to see if it matches one of the standard DateFormat style patterns: FULL, LONG, MEDIUM, SHORT, or DEFAULT.
final public static  CalendargetSystemCalendar()
    
final public static  DategetSystemDate()
    
final public static  longgetSystemTime()
    
public  TimeZonegetTimeZone()
     This implementation returns the default TimeZone.
public  IntegergetValue(Object field)
     Return the specified value of the date returned by DateTool.getCalendar() or null if the field is invalid.
public  IntegergetValue(Object field, Object date)
     Returns the specified value of the specified date, or null if the field or date is invalid.
public  IntegergetValue(int field, Object date)
     Returns the specified value of the specified date, or null if the field or date is invalid.
Parameters:
  field - the int for the desired field (e.g.
public  IntegergetYear()
     Returns the year value of the date returned by DateTool.getCalendar() .
public  IntegergetYear(Object date)
     Returns the year value of the specified date.
protected  voidsetFormat(String format)
     Sets the default format for this instance.
public  CalendartoCalendar(Object obj)
     Converts an object to an instance of Calendar using the locale returned by DateTool.getLocale() if necessary.
public  CalendartoCalendar(Object obj, Locale locale)
     Converts an object to an instance of Calendar using the locale returned by DateTool.getLocale() if necessary.
public  DatetoDate(Object obj)
     Converts an object to an instance of Date using the format returned by DateTool.getFormat() ,the Locale returned by DateTool.getLocale() , and the TimeZone returned by DateTool.getTimeZone() if the object is not already an instance of Date, Calendar, or Long.
public  DatetoDate(String format, Object obj)
     Converts an object to an instance of Date using the specified format,the Locale returned by DateTool.getLocale() , and the TimeZone returned by DateTool.getTimeZone() if the object is not already an instance of Date, Calendar, or Long.
public  DatetoDate(String format, Object obj, Locale locale)
     Converts an object to an instance of Date using the specified format and Locale if the object is not already an instance of Date, Calendar, or Long.
public  DatetoDate(String format, Object obj, Locale locale, TimeZone timezone)
     Converts an object to an instance of Date using the specified format, Locale , and TimeZone if the object is not already an instance of Date, Calendar, or Long.
public  StringtoString()
    

Field Detail
DEFAULT_FORMAT
final public static String DEFAULT_FORMAT(Code)
The default format to be used when none is specified.
since:
   VelocityTools 1.1



DEFAULT_FORMAT_KEY
final public static String DEFAULT_FORMAT_KEY(Code)
The key used for specifying a default format via toolbox params.
since:
   VelocityTools 1.3




Constructor Detail
DateTool
public DateTool()(Code)
Default constructor.




Method Detail
configure
public void configure(Map params)(Code)
Looks for a default format value in the given params.
since:
   VelocityTools 1.3



format
public String format(Object obj)(Code)
Converts the specified object to a date and formats it according to the pattern or style returned by DateTool.getFormat() .
Parameters:
  obj - the date object to be formatted the specified date formatted as a string
See Also:   DateTool.format(String format,Object obj,Locale locale,TimeZone timezone)
since:
   VelocityTools 1.1



format
public String format(String format, Object obj)(Code)
Converts the specified object to a date and returns a formatted string representing that date in the locale returned by DateTool.getLocale() .
Parameters:
  format - the formatting instructions
Parameters:
  obj - the date object to be formatted a formatted string for this locale representing the specifieddate or null if the parameters are invalid
See Also:   DateTool.format(String format,Object obj,Locale locale,TimeZone timezone)



format
public String format(String format, Object obj, Locale locale)(Code)
Converts the specified object to a date and returns a formatted string representing that date in the specified Locale .
Parameters:
  format - the formatting instructions
Parameters:
  obj - the date object to be formatted
Parameters:
  locale - the locale to be used when formatting the given date as a formatted string
See Also:   DateTool.format(String format,Object obj,Locale locale,TimeZone timezone)



format
public String format(String format, Object obj, Locale locale, TimeZone timezone)(Code)
Returns a formatted string representing the specified date, Locale , and TimeZone .

The specified format may be a standard style pattern ('full', 'long', 'medium', 'short', or 'default').

You may also specify that you want only the date or time portion be appending '_date' or '_time' respectively to the standard style pattern. (e.g. 'full_date' or 'long_time')

If the format fits neither of these patterns, then the output will be formatted according to the symbols defined by SimpleDateFormat :

 Symbol   Meaning                 Presentation        Example
 ------   -------                 ------------        -------
 G        era designator          (Text)              AD
 y        year                    (Number)            1996
 M        month in year           (Text & Number)     July & 07
 d        day in month            (Number)            10
 h        hour in am/pm (1~12)    (Number)            12
 H        hour in day (0~23)      (Number)            0
 m        minute in hour          (Number)            30
 s        second in minute        (Number)            55
 S        millisecond             (Number)            978
 E        day in week             (Text)              Tuesday
 D        day in year             (Number)            189
 F        day of week in month    (Number)            2 (2nd Wed in July)
 w        week in year            (Number)            27
 W        week in month           (Number)            2
 a        am/pm marker            (Text)              PM
 k        hour in day (1~24)      (Number)            24
 K        hour in am/pm (0~11)    (Number)            0
 z        time zone               (Text)              Pacific Standard Time
 '        escape for text         (Delimiter)
 ''       single quote            (Literal)           '
 Examples: "E, MMMM d" will result in "Tue, July 24"
 "EEE, M-d (H:m)" will result in "Tuesday, 7-24 (14:12)"
 


Parameters:
  format - the custom or standard pattern to be used
Parameters:
  obj - the date to format
Parameters:
  locale - the Locale to format the date for
Parameters:
  timezone - the TimeZone to be used when formatting a formatted string representing the specified date ornull if the parameters are invalid
since:
   VelocityTools 1.1



format
public String format(String dateStyle, String timeStyle, Object obj)(Code)
Returns the specified date as a string formatted according to the specified date and/or time styles.
Parameters:
  dateStyle - the style pattern for the date
Parameters:
  timeStyle - the style pattern for the time
Parameters:
  obj - the date to be formatted a formatted representation of the given date
See Also:   DateTool.format(String dateStyle,String timeStyle,Object obj,Locale locale,TimeZone timezone)
since:
   VelocityTools 1.1



format
public String format(String dateStyle, String timeStyle, Object obj, Locale locale)(Code)
Returns the specified date as a string formatted according to the specified Locale and date and/or time styles.
Parameters:
  dateStyle - the style pattern for the date
Parameters:
  timeStyle - the style pattern for the time
Parameters:
  obj - the date to be formatted
Parameters:
  locale - the Locale to be used for formatting the date a formatted representation of the given date
See Also:   DateTool.format(String dateStyle,String timeStyle,Object obj,Locale locale,TimeZone timezone)
since:
   VelocityTools 1.1



format
public String format(String dateStyle, String timeStyle, Object obj, Locale locale, TimeZone timezone)(Code)
Returns the specified date as a string formatted according to the specified Locale and date and/or time styles.
Parameters:
  dateStyle - the style pattern for the date
Parameters:
  timeStyle - the style pattern for the time
Parameters:
  obj - the date to be formatted
Parameters:
  locale - the Locale to be used for formatting the date
Parameters:
  timezone - the TimeZone the date should be formatted for a formatted representation of the given date
See Also:   java.text.DateFormat
See Also:   DateTool.format(String dateStyle,String timeStyle,Object obj,Locale locale,TimeZone timezone)
since:
   VelocityTools 1.1



get
public String get(String format)(Code)
Returns a formatted string representing the date returned by DateTool.getDate() . In its default implementation, this method allows you to retrieve the current date in standard formats by simply doing things like $date.medium or $date.full. If you want only the date or time portion you can specify that along with the standard formats. (e.g. $date.medium_date or $date.short_time) More complex or custom formats can be retrieved by using the full method syntax. (e.g. $date.get('E, MMMM d'))
Parameters:
  format - the formatting instructions a formatted representation of the date returned byDateTool.getDate()
See Also:   DateTool.format(String format,Object obj,Locale locale,TimeZone timezone)
since:
   VelocityTools 1.1



get
public String get(String dateStyle, String timeStyle)(Code)
Returns a formatted string representing the date and/or time given by DateTool.getDate() in standard, localized patterns.
Parameters:
  dateStyle - the style pattern for the date
Parameters:
  timeStyle - the style pattern for the time a formatted representation of the date returned byDateTool.getDate()
See Also:   DateFormat
See Also:   DateTool.format(String dateStyle,String timeStyle,Object obj,Locale locale,TimeZone timezone)
since:
   VelocityTools 1.1



getCalendar
public Calendar getCalendar()(Code)
Returns a Calendar instance created using the timezone and locale returned by getTimeZone() and getLocale(). This allows subclasses to easily override the default locale and timezone used by this tool.

Sub-classes may override this method to return a Calendar instance not based on the system date. Doing so will also cause the getDate(), get(String), get(String,String), and toString() methods to return dates equivalent to the Calendar returned by this method, because those methods return values derived from the result of this method.

a Calendar instance created using the results ofDateTool.getTimeZone() and DateTool.getLocale().
See Also:   Calendar.getInstance(TimeZone zoneLocale aLocale)



getDate
public Date getDate()(Code)
Returns a Date derived from the result of DateTool.getCalendar a Date derived from the result of DateTool.getCalendar



getDateFormat
public DateFormat getDateFormat(String format, Locale locale, TimeZone timezone)(Code)
Returns a DateFormat instance for the specified format, Locale , and TimeZone . If the format specified is a standard style pattern, then a date-time instance will be returned with both the date and time styles set to the specified style. If it is a custom format, then a customized SimpleDateFormat will be returned.
Parameters:
  format - the custom or standard formatting pattern to be used
Parameters:
  locale - the Locale to be used
Parameters:
  timezone - the TimeZone to be used an instance of DateFormat
See Also:   SimpleDateFormat
See Also:   DateFormat
since:
   VelocityTools 1.1



getDateFormat
public DateFormat getDateFormat(String dateStyle, String timeStyle, Locale locale, TimeZone timezone)(Code)
Returns a DateFormat instance for the specified date style, time style, Locale , and TimeZone .
Parameters:
  dateStyle - the date style
Parameters:
  timeStyle - the time style
Parameters:
  locale - the Locale to be used
Parameters:
  timezone - the TimeZone to be used an instance of DateFormat
See Also:   DateTool.getDateFormat(int timeStyle,int dateStyle,Locale locale,TimeZone timezone)
since:
   VelocityTools 1.1



getDateFormat
protected DateFormat getDateFormat(int dateStyle, int timeStyle, Locale locale, TimeZone timezone)(Code)
Returns a DateFormat instance for the specified time style, date style, Locale , and TimeZone .
Parameters:
  dateStyle - the date style (date will be ignored if this isless than zero and the date style is not)
Parameters:
  timeStyle - the time style (time will be ignored if this isless than zero and the date style is not)
Parameters:
  locale - the Locale to be used
Parameters:
  timezone - the TimeZone to be used an instance of DateFormat or nullif an instance cannot be constructed with the givenparameters
since:
   VelocityTools 1.1



getDay
public Integer getDay()(Code)
Returns the day (of the month) value of the date returned by DateTool.getCalendar() .

NOTE: Unlike java.util.Date, this returns the day of the month. It is equivalent to Date.getDate() and Calendar.get(Calendar.DAY_OF_MONTH). We could not call this method getDate() because that already exists in this class with a different function.
since:
   VelocityTools 1.2



getDay
public Integer getDay(Object date)(Code)
Returns the day (of the month) value for the specified date.

NOTE: Unlike java.util.Date, this returns the day of the month. It is equivalent to Date.getDate() and Calendar.get(Calendar.DAY_OF_MONTH). We could not call this method getDate() because that already exists in this class with a different function.
since:
   VelocityTools 1.2



getFormat
public String getFormat()(Code)
Return the pattern or style to be used for formatting dates when none is specified. This implementation gives a 'default' date-time format. Subclasses may override this to provide a different default format.

This can now be configured via the toolbox definition. Add a <parameter name="format" value="short"/> to your date tool configuration.


since:
   VelocityTools 1.1



getLocale
public Locale getLocale()(Code)
This implementation returns the default locale. Subclasses may override this to return alternate locales. Please note that doing so will affect all formatting methods where no locale is specified in the parameters. the default Locale



getMonth
public Integer getMonth()(Code)
Returns the month value of the date returned by DateTool.getCalendar() .
since:
   VelocityTools 1.2



getMonth
public Integer getMonth(Object date)(Code)
Returns the month value of the specified date.
since:
   VelocityTools 1.2



getStyleAsInt
protected int getStyleAsInt(String style)(Code)
Checks a string to see if it matches one of the standard DateFormat style patterns: FULL, LONG, MEDIUM, SHORT, or DEFAULT. If it does, it will return the integer constant for that pattern. If not, it will return -1.
See Also:   DateFormat
Parameters:
  style - the string to be checked the int identifying the style pattern
since:
   VelocityTools 1.1



getSystemCalendar
final public static Calendar getSystemCalendar()(Code)
the system's current time as a Calendar



getSystemDate
final public static Date getSystemDate()(Code)
the system's current time as a Date



getSystemTime
final public static long getSystemTime()(Code)
the system's current time as the number of millisecondselapsed since January 1, 1970, 00:00:00 GMT.



getTimeZone
public TimeZone getTimeZone()(Code)
This implementation returns the default TimeZone. Subclasses may override this to return alternate timezones. Please note that doing so will affect all formatting methods where no timezone is specified in the parameters. the default TimeZone



getValue
public Integer getValue(Object field)(Code)
Return the specified value of the date returned by DateTool.getCalendar() or null if the field is invalid.
since:
   VelocityTools 1.2



getValue
public Integer getValue(Object field, Object date)(Code)
Returns the specified value of the specified date, or null if the field or date is invalid. The field may be an Integer or it may be the name of the field as a String.
Parameters:
  field - the corresponding Integer value or String name of the desired value
Parameters:
  date - the date/calendar from which the field value will be taken
since:
   VelocityTools 1.2



getValue
public Integer getValue(int field, Object date)(Code)
Returns the specified value of the specified date, or null if the field or date is invalid.
Parameters:
  field - the int for the desired field (e.g. Calendar.MONTH)
Parameters:
  date - the date/calendar from which the field value will be taken
since:
   VelocityTools 1.2



getYear
public Integer getYear()(Code)
Returns the year value of the date returned by DateTool.getCalendar() .
since:
   VelocityTools 1.2



getYear
public Integer getYear(Object date)(Code)
Returns the year value of the specified date.
since:
   VelocityTools 1.2



setFormat
protected void setFormat(String format)(Code)
Sets the default format for this instance. This is protected, because templates ought not to be using it; hat would not be threadsafe so far as templates are concerned.
since:
   VelocityTools 1.3



toCalendar
public Calendar toCalendar(Object obj)(Code)
Converts an object to an instance of Calendar using the locale returned by DateTool.getLocale() if necessary.
Parameters:
  obj - the date to convert the converted date
See Also:   DateTool.toCalendar(Object obj,Locale locale)



toCalendar
public Calendar toCalendar(Object obj, Locale locale)(Code)
Converts an object to an instance of Calendar using the locale returned by DateTool.getLocale() if necessary.
Parameters:
  obj - the date to convert
Parameters:
  locale - the locale used the converted date
See Also:   DateTool.toDate(String format,Object obj,Locale locale)
See Also:   Calendar



toDate
public Date toDate(Object obj)(Code)
Converts an object to an instance of Date using the format returned by DateTool.getFormat() ,the Locale returned by DateTool.getLocale() , and the TimeZone returned by DateTool.getTimeZone() if the object is not already an instance of Date, Calendar, or Long.
Parameters:
  obj - the date to convert the object as a Date or null if noconversion is possible



toDate
public Date toDate(String format, Object obj)(Code)
Converts an object to an instance of Date using the specified format,the Locale returned by DateTool.getLocale() , and the TimeZone returned by DateTool.getTimeZone() if the object is not already an instance of Date, Calendar, or Long.
Parameters:
  format - - the format the date is in
Parameters:
  obj - - the date to convert the object as a Date or null if noconversion is possible
See Also:   DateTool.toDate(String format,Object obj,Locale locale)



toDate
public Date toDate(String format, Object obj, Locale locale)(Code)
Converts an object to an instance of Date using the specified format and Locale if the object is not already an instance of Date, Calendar, or Long.
Parameters:
  format - - the format the date is in
Parameters:
  obj - - the date to convert
Parameters:
  locale - - the Locale the object as a Date or null if noconversion is possible
See Also:   SimpleDateFormat.parse



toDate
public Date toDate(String format, Object obj, Locale locale, TimeZone timezone)(Code)
Converts an object to an instance of Date using the specified format, Locale , and TimeZone if the object is not already an instance of Date, Calendar, or Long.
Parameters:
  format - - the format the date is in
Parameters:
  obj - - the date to convert
Parameters:
  locale - - the Locale
Parameters:
  timezone - - the TimeZone the object as a Date or null if noconversion is possible
See Also:   DateTool.getDateFormat
See Also:   SimpleDateFormat.parse



toString
public String toString()(Code)
the result of DateTool.getDate() formatted according to the resultof DateTool.getFormat().
See Also:   DateTool.format(String format,Object obj)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.