public class

QuarterDateFormat

extends DateFormat
implements Serializable Cloneable
java.lang.Object
   ↳ java.text.Format
     ↳ java.text.DateFormat
       ↳ org.jfree.chart.axis.QuarterDateFormat

Class Overview

A formatter that formats dates to show the year and quarter (for example, '2004 IV' for the last quarter of 2004.

Summary

[Expand]
Inherited Constants
From class java.text.DateFormat
Fields
public static final String[] GREEK_QUARTERS Symbols for greek numbered quarters.
public static final String[] REGULAR_QUARTERS Symbols for regular quarters.
public static final String[] ROMAN_QUARTERS Symbols for roman numbered quarters.
[Expand]
Inherited Fields
From class java.text.DateFormat
Public Constructors
QuarterDateFormat()
Creates a new instance for the default time zone.
QuarterDateFormat(TimeZone zone)
Creates a new instance for the specified time zone.
QuarterDateFormat(TimeZone zone, String[] quarterSymbols)
Creates a new instance for the specified time zone.
QuarterDateFormat(TimeZone zone, String[] quarterSymbols, boolean quarterFirst)
Creates a new instance for the specified time zone.
Public Methods
boolean equals(Object obj)
Tests this formatter for equality with an arbitrary object.
StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
Formats the given date.
Date parse(String source, ParsePosition pos)
Parses the given string (not implemented).
[Expand]
Inherited Methods
From class java.text.DateFormat
From class java.text.Format
From class java.lang.Object

Fields

public static final String[] GREEK_QUARTERS

Symbols for greek numbered quarters.

public static final String[] REGULAR_QUARTERS

Symbols for regular quarters.

public static final String[] ROMAN_QUARTERS

Symbols for roman numbered quarters.

Public Constructors

public QuarterDateFormat ()

Creates a new instance for the default time zone.

public QuarterDateFormat (TimeZone zone)

Creates a new instance for the specified time zone.

Parameters
zone the time zone (null not permitted).

public QuarterDateFormat (TimeZone zone, String[] quarterSymbols)

Creates a new instance for the specified time zone.

Parameters
zone the time zone (null not permitted).
quarterSymbols the quarter symbols.

public QuarterDateFormat (TimeZone zone, String[] quarterSymbols, boolean quarterFirst)

Creates a new instance for the specified time zone.

Parameters
zone the time zone (null not permitted).
quarterSymbols the quarter symbols.
quarterFirst a flag that controls whether the quarter or the year is displayed first.

Public Methods

public boolean equals (Object obj)

Tests this formatter for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public StringBuffer format (Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)

Formats the given date.

Parameters
date the date.
toAppendTo the string buffer.
fieldPosition the field position.
Returns
  • The formatted date.

public Date parse (String source, ParsePosition pos)

Parses the given string (not implemented).

Parameters
source the date string.
pos the parse position.
Returns
  • null, as this method has not been implemented.