FastDatePrinter is a fast and thread-safe version of {@link java.text.SimpleDateFormat}.
This class can be used as a direct replacement to {@code SimpleDateFormat} in most formatting situations.This class is especially useful in multi-threaded server environments. {@code SimpleDateFormat} is not thread-safe in any JDK version,nor will it be as Sun have closed the bug/RFE.
Only formatting is supported, but all patterns are compatible with SimpleDateFormat (except time zones and some year patterns - see below).
Java 1.4 introduced a new pattern letter, {@code 'Z'}, to represent time zones in RFC822 format (eg. {@code +0800} or {@code -1100}). This pattern letter can be used here (on all JDK versions).
In addition, the pattern {@code 'ZZ'} has been made to representISO8601 full format time zones (eg. {@code +08:00} or {@code -11:00}). This introduces a minor incompatibility with Java 1.4, but at a gain of useful functionality.
Javadoc cites for the year pattern: For formatting, if the number of pattern letters is 2, the year is truncated to 2 digits; otherwise it is interpreted as a number. Starting with Java 1.7 a pattern of 'Y' or 'YYY' will be formatted as '2003', while it was '03' in former Java versions. FastDatePrinter implements the behavior of Java 7.
@version $Id: FastDatePrinter.java 1567799 2014-02-12 23:25:58Z sebb $
@since 3.2