Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.core.format
Class DateFormatter

    java.lang.Object
      org.eclipse.birt.core.format.DateFormatter

    public class DateFormatter

extends java.lang.Object

DateFormatter. Design for Class DateFormatter.This version is for open source, so we only apply the function which Java has provided. Beside these basic function, in this version, we also provide some new API for further implementation in the future

Field Summary
`static java.lang.String` | `DATE_UNFORMATTED`
`static java.lang.String` | `DATETIME_UNFORMATTED`
`protected static java.util.logging.Logger` | `logger` logger used to log syntax errors.
`static java.lang.String` | `TIME_UNFORMATTED`

Constructor Summary
`DateFormatter()` constuctor method with no paremeter
`DateFormatter(java.util.Locale localeLoc)` Deprecated. since 2.1
`DateFormatter(java.lang.String pattern)` constuctor method with String parameter
`DateFormatter(java.lang.String pattern, java.util.Locale localeLoc)` Deprecated. since 2.1
`DateFormatter(java.lang.String pattern, com.ibm.icu.util.ULocale localeLoc)` constuctor method with two parameters, one is String type while the other is Locale type
`DateFormatter(java.lang.String pattern, com.ibm.icu.util.ULocale localeLoc, com.ibm.icu.util.TimeZone timeZone)`
`DateFormatter(com.ibm.icu.util.TimeZone timeZone)`
`DateFormatter(com.ibm.icu.util.ULocale localeLoc)` constuctor method with Locale parameters
`DateFormatter(com.ibm.icu.util.ULocale localeLoc, com.ibm.icu.util.TimeZone timeZone)`

Method Summary
`void` | `applyPattern(java.lang.String formatString)`
`java.lang.String` | `format(java.util.Date date)`
`java.lang.String` | `getFormatCode()` Returns format code according to format type and current locale
`com.ibm.icu.text.SimpleDateFormat` | `getFormatter()` Returns format code according to format type and current locale
`java.lang.String` | `getLocalizedFormatCode()` Returns format code according to format type and current locale
`java.lang.String` | `getPattern()` get the string pattern
`java.util.Date` | `parse(java.lang.String date)` Parses the input string into a formatted date type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DATETIME_UNFORMATTED

    public static final java.lang.String DATETIME_UNFORMATTED

See Also:
  Constant Field Values

### DATE_UNFORMATTED

    public static final java.lang.String DATE_UNFORMATTED

See Also:
  Constant Field Values

### TIME_UNFORMATTED

    public static final java.lang.String TIME_UNFORMATTED

See Also:
  Constant Field Values

### logger

    protected static java.util.logging.Logger logger

  logger used to log syntax errors.

Constructor Detail

### DateFormatter

    public DateFormatter()

  constuctor method with no paremeter

### DateFormatter

    public DateFormatter(com.ibm.icu.util.TimeZone timeZone)

### DateFormatter

    public DateFormatter(java.lang.String pattern)

  constuctor method with String parameter

  Parameters:
    `pattern` -

### DateFormatter

    public DateFormatter(com.ibm.icu.util.ULocale localeLoc)

  constuctor method with Locale parameters

  Parameters:
    `localeLoc` -

### DateFormatter

    public DateFormatter(com.ibm.icu.util.ULocale localeLoc,
                         com.ibm.icu.util.TimeZone timeZone)

### DateFormatter

    public DateFormatter(java.util.Locale localeLoc)

  Deprecated. since 2.1

### DateFormatter

    public DateFormatter(java.lang.String pattern,
                         com.ibm.icu.util.ULocale localeLoc)

  constuctor method with two parameters, one is String type while the other is Locale type

  Parameters:
    `pattern` -
    `localeLoc` -

### DateFormatter

    public DateFormatter(java.lang.String pattern,
                         com.ibm.icu.util.ULocale localeLoc,
                         com.ibm.icu.util.TimeZone timeZone)

### DateFormatter

    public DateFormatter(java.lang.String pattern,
                         java.util.Locale localeLoc)

  Deprecated. since 2.1

Method Detail

### getPattern

    public java.lang.String getPattern()

  get the string pattern

  Returns:

### applyPattern

    public void applyPattern(java.lang.String formatString)

### format

    public java.lang.String format(java.util.Date date)

### getFormatCode

    public java.lang.String getFormatCode()

  Returns format code according to format type and current locale

### getLocalizedFormatCode

    public java.lang.String getLocalizedFormatCode()

  Returns format code according to format type and current locale

### getFormatter

    public com.ibm.icu.text.SimpleDateFormat getFormatter()

  Returns format code according to format type and current locale

### parse

    public java.util.Date parse(java.lang.String date)
                         throws java.text.ParseException

  Parses the input string into a formatted date type.

  Parameters:
    `date` - the input string to parse
  Returns:
    the formatted date
  Throws:
    `java.text.ParseException` - if the beginning of the specified string cannot be parsed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.