Java Doc for DateFormat.java in  » Database-ORM » MMBase » org » mmbase » bridge » util » xml » 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 » Database ORM » MMBase » org.mmbase.bridge.util.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.bridge.util.xml.DateFormat

DateFormat
public class DateFormat (Code)
Dates are stored as integer in mmbase. If you want to show these dates in a nice format in the XSL transformation. it is necessary to use this Xalan extension. The XSLT looks like this then:
 <xsl:stylesheet  version = "1.0"
 xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
 xmlns:date ="org.mmbase.bridge.util.xml.DateFormat"
 >
 

author:
   Nico Klasens
author:
   Martijn Houtman
author:
   Michiel Meeuwissen
version:
   $Id: DateFormat.java,v 1.15 2007/04/09 19:10:27 michiel Exp $
since:
   MMBase-1.7




Method Summary
public static  Stringformat(String number, String fieldName, String pattern, String timeZone, String language, String country)
     Formats a node's field value with the date pattern
Parameters:
  number - the number or alias of the node containing the field
Parameters:
  fieldName - the name of the field to format
Parameters:
  pattern - the date pattern (i.e.
public static  Stringformat(String cloudName, String number, String fieldName, String pattern, String timeZone, String language, String country)
     Formats a node's field value with the date pattern
Parameters:
  cloudName - the name of the cloud in which to find the node
Parameters:
  number - the number or alias of the node containing the field
Parameters:
  fieldName - the name of the field to format
Parameters:
  pattern - the date pattern (i.e.
public static  Stringformat(Cloud cloud, String number, String fieldName, String pattern, String timeZone)
     Formats a node's field value with the date pattern
Parameters:
  cloud - the cloud in which to find the node
Parameters:
  number - the number or alias of the node containing the field
Parameters:
  fieldName - the name of the field to format
Parameters:
  pattern - the date pattern (i.e.
public static  Stringformat(String fieldValue, String pattern, String timeZone, String language, String country)
     Formats the fieldvalue to a date pattern
Parameters:
  fieldValue - time-stamp in seconds
Parameters:
  pattern - the date pattern (i.e.
public static  Stringformat(String fieldValue, String pattern, int factor, String timeZone, String language, String country)
     Formats the fieldvalue to a date pattern
Parameters:
  fieldValue - time-stamp
Parameters:
  pattern - the date pattern (i.e.
protected static  Stringformat(String fieldValue, String pattern, int factor, String timeZone, Locale locale)
    
Parameters:
  fieldValue - time-stamp
Parameters:
  pattern - the date pattern (i.e.
public static  Stringformat(Cloud cloud, org.w3c.dom.Node node, String fieldName, String pattern, String timeZone)
     Formats a node's field value with the date pattern. This version requires you to supply a DOM node.
public static  intgetDatePart(String fieldValue, int factor, int datePart)
     Returns the a part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  factor - Factor to multiply fieldvalue to make milliseconds.
public static  intgetDatePart(String fieldValue, int factor, int datePart, String timeZone)
     Returns the a part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  factor - Factor to multiply fieldvalue to make milliseconds.
public static  intgetDay(String fieldValue)
    
public static  intgetDay(String fieldValue, String timeZone)
    
public static  intgetHours(String fieldValue)
    
public static  intgetHours(String fieldValue, String timeZone)
    
public static  intgetMinutes(String fieldValue)
    
public static  intgetMinutes(String fieldValue, String timeZone)
    
public static  intgetMonth(String fieldValue)
    
public static  intgetMonth(String fieldValue, String timeZone)
    
public static  intgetSeconds(String fieldValue)
    
public static  intgetSeconds(String fieldValue, String timeZone)
    
public static  intgetYear(String fieldValue)
    
public static  intgetYear(String fieldValue, String timeZone)
    



Method Detail
format
public static String format(String number, String fieldName, String pattern, String timeZone, String language, String country)(Code)
Formats a node's field value with the date pattern
Parameters:
  number - the number or alias of the node containing the field
Parameters:
  fieldName - the name of the field to format
Parameters:
  pattern - the date pattern (i.e. 'dd-MM-yyyy')
Parameters:
  timeZone - timezone of the field value
Parameters:
  language - Language of the field value
Parameters:
  country - country of the field value the formatted string



format
public static String format(String cloudName, String number, String fieldName, String pattern, String timeZone, String language, String country)(Code)
Formats a node's field value with the date pattern
Parameters:
  cloudName - the name of the cloud in which to find the node
Parameters:
  number - the number or alias of the node containing the field
Parameters:
  fieldName - the name of the field to format
Parameters:
  pattern - the date pattern (i.e. 'dd-MM-yyyy')
Parameters:
  timeZone - timezone of the field value
Parameters:
  language - Language of the field value
Parameters:
  country - country of the field value the formatted string



format
public static String format(Cloud cloud, String number, String fieldName, String pattern, String timeZone)(Code)
Formats a node's field value with the date pattern
Parameters:
  cloud - the cloud in which to find the node
Parameters:
  number - the number or alias of the node containing the field
Parameters:
  fieldName - the name of the field to format
Parameters:
  pattern - the date pattern (i.e. 'dd-MM-yyyy')
Parameters:
  timeZone - timezone of the field value the formatted string



format
public static String format(String fieldValue, String pattern, String timeZone, String language, String country)(Code)
Formats the fieldvalue to a date pattern
Parameters:
  fieldValue - time-stamp in seconds
Parameters:
  pattern - the date pattern (i.e. 'dd-MM-yyyy')
Parameters:
  timeZone - timezone of the field value
Parameters:
  language - Language of the field value
Parameters:
  country - country of the field value the formatted string



format
public static String format(String fieldValue, String pattern, int factor, String timeZone, String language, String country)(Code)
Formats the fieldvalue to a date pattern
Parameters:
  fieldValue - time-stamp
Parameters:
  pattern - the date pattern (i.e. 'dd-MM-yyyy')
Parameters:
  factor - Factor to multiply fieldvalue to make milliseconds. Should be 1000 normally (so field in seconds)
Parameters:
  timeZone - Timezone. Null or blank means server timezone. If not recognized it will fall back to GMT.
Parameters:
  language - The language for which the date must be formatted.
Parameters:
  country - The country for which the date must be formatted. the formatted string



format
protected static String format(String fieldValue, String pattern, int factor, String timeZone, Locale locale)(Code)

Parameters:
  fieldValue - time-stamp
Parameters:
  pattern - the date pattern (i.e. 'dd-MM-yyyy')
Parameters:
  factor - Factor to multiply fieldvalue to make milliseconds. Should be 1000 normally (so field in seconds)
Parameters:
  timeZone - Timezone. Null or blank means server timezone. If not recognized it will fall back to GMT.
Parameters:
  locale - The locale for which the date must be formatted. the formatted String



format
public static String format(Cloud cloud, org.w3c.dom.Node node, String fieldName, String pattern, String timeZone) throws XPathExpressionException(Code)
Formats a node's field value with the date pattern. This version requires you to supply a DOM node. It will search for a tag of the form <field name='number' > and uses it's contents to retrieve the node.
Parameters:
  cloud - the cloud in which to find the node
Parameters:
  node - A DOM node (xml) containing the node's fields as subtags
Parameters:
  fieldName - the name of the field to format
Parameters:
  pattern - the date pattern (i.e. 'dd-MM-yyyy')
Parameters:
  timeZone - The timezone of the field value the formatted string
throws:
  javax.xml.transform.TransformerException - if something went wrong while searching the DOM Node



getDatePart
public static int getDatePart(String fieldValue, int factor, int datePart)(Code)
Returns the a part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  factor - Factor to multiply fieldvalue to make milliseconds. Should be 1000 normally (so field in seconds)
Parameters:
  datePart - which part of the date should be returned. These are Calendar constants a part



getDatePart
public static int getDatePart(String fieldValue, int factor, int datePart, String timeZone)(Code)
Returns the a part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  factor - Factor to multiply fieldvalue to make milliseconds. Should be 1000 normally (so field in seconds)
Parameters:
  datePart - which part of the date should be returned. These are Calendar constants
Parameters:
  timeZone - Timezone. Null or blank means server timezone. If not recognized it will fall back to GMT. a part



getDay
public static int getDay(String fieldValue)(Code)
Returns the day of the month part of the date
Parameters:
  fieldValue - time-stamp day of the month part



getDay
public static int getDay(String fieldValue, String timeZone)(Code)
Returns the day of the month part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  timeZone - timezone day of the month part



getHours
public static int getHours(String fieldValue)(Code)
Returns the hours part of the date
Parameters:
  fieldValue - time-stamp hours part



getHours
public static int getHours(String fieldValue, String timeZone)(Code)
Returns the hours part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  timeZone - timezone hours part



getMinutes
public static int getMinutes(String fieldValue)(Code)
Returns the minutes part of the date
Parameters:
  fieldValue - time-stamp minutes part



getMinutes
public static int getMinutes(String fieldValue, String timeZone)(Code)
Returns the minutes part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  timeZone - timezone minutes part



getMonth
public static int getMonth(String fieldValue)(Code)
Returns the month part of the date
Parameters:
  fieldValue - time-stamp month part



getMonth
public static int getMonth(String fieldValue, String timeZone)(Code)
Returns the month part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  timeZone - timezone month part



getSeconds
public static int getSeconds(String fieldValue)(Code)
Returns the seconds part of the date
Parameters:
  fieldValue - time-stamp seconds part



getSeconds
public static int getSeconds(String fieldValue, String timeZone)(Code)
Returns the seconds part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  timeZone - timezone seconds part



getYear
public static int getYear(String fieldValue)(Code)
Returns the year part of the date
Parameters:
  fieldValue - time-stamp year part



getYear
public static int getYear(String fieldValue, String timeZone)(Code)
Returns the year part of the date
Parameters:
  fieldValue - time-stamp
Parameters:
  timeZone - timezone year part



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.