Repository: commons-lang Updated Branches: refs/heads/master 00fafe772 -> 6d3796e64
LANG-1002: Several predefined ISO FastDateFormats in DateFormatUtils are incorrect Since the naming template is ISO <ID>, new constants have been renamed to ISO_8601_... Additionally, the constants represent the extended format. That should be reflected in their names. Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/6d3796e6 Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/6d3796e6 Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/6d3796e6 Branch: refs/heads/master Commit: 6d3796e64bdd5f3f4857bfca6982e6ecf98a2b33 Parents: 00fafe7 Author: Michael Osipov <[email protected]> Authored: Wed Oct 14 12:46:08 2015 +0200 Committer: Michael Osipov <[email protected]> Committed: Wed Oct 14 12:46:08 2015 +0200 ---------------------------------------------------------------------- .../commons/lang3/time/DateFormatUtils.java | 30 ++++++++++---------- .../commons/lang3/time/FastDateFormat.java | 2 +- .../commons/lang3/time/FastDatePrinter.java | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6d3796e6/src/main/java/org/apache/commons/lang3/time/DateFormatUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/time/DateFormatUtils.java b/src/main/java/org/apache/commons/lang3/time/DateFormatUtils.java index 88640b4..45e2d32 100644 --- a/src/main/java/org/apache/commons/lang3/time/DateFormatUtils.java +++ b/src/main/java/org/apache/commons/lang3/time/DateFormatUtils.java @@ -46,14 +46,14 @@ public class DateFormatUtils { * This format uses the default TimeZone in effect at the time of loading DateFormatUtils class. * @since 3.5 */ - public static final FastDateFormat ISO8601_DATETIME_FORMAT + public static final FastDateFormat ISO_8601_EXTENDED_DATETIME_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss"); /** - * @deprecated - as of 4.0, ISO_DATETIME_FORMAT will be replaced by ISO8601_DATETIME_FORMAT. + * @deprecated - as of 4.0, ISO_DATETIME_FORMAT will be replaced by ISO_8601_EXTENDED_DATETIME_FORMAT. */ @Deprecated - public static final FastDateFormat ISO_DATETIME_FORMAT = ISO8601_DATETIME_FORMAT; + public static final FastDateFormat ISO_DATETIME_FORMAT = ISO_8601_EXTENDED_DATETIME_FORMAT; /** * ISO 8601 formatter for date-time with time zone. @@ -61,14 +61,14 @@ public class DateFormatUtils { * This format uses the default TimeZone in effect at the time of loading DateFormatUtils class. * @since 3.5 */ - public static final FastDateFormat ISO8601_DATETIME_TIME_ZONE_FORMAT + public static final FastDateFormat ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssZZ"); /** - * @deprecated - as of 4.0, ISO_DATETIME_TIME_ZONE_FORMAT will be replaced by ISO8601_DATETIME_TIME_ZONE_FORMAT. + * @deprecated - as of 4.0, ISO_DATETIME_TIME_ZONE_FORMAT will be replaced by ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT. */ @Deprecated - public static final FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT = ISO8601_DATETIME_TIME_ZONE_FORMAT; + public static final FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT = ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT; /** * ISO 8601 formatter for date without time zone. @@ -76,14 +76,14 @@ public class DateFormatUtils { * This format uses the default TimeZone in effect at the time of loading DateFormatUtils class. * @since 3.5 */ - public static final FastDateFormat ISO8601_DATE_FORMAT + public static final FastDateFormat ISO_8601_EXTENDED_DATE_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd"); /** - * @deprecated - as of 4.0, ISO_DATE_FORMAT will be replaced by ISO8601_DATE_FORMAT. + * @deprecated - as of 4.0, ISO_DATE_FORMAT will be replaced by ISO_8601_EXTENDED_DATE_FORMAT. */ @Deprecated - public static final FastDateFormat ISO_DATE_FORMAT = ISO8601_DATE_FORMAT; + public static final FastDateFormat ISO_DATE_FORMAT = ISO_8601_EXTENDED_DATE_FORMAT; /** * ISO 8601-like formatter for date with time zone. @@ -126,14 +126,14 @@ public class DateFormatUtils { * This format uses the default TimeZone in effect at the time of loading DateFormatUtils class. * @since 3.5 */ - public static final FastDateFormat ISO8601_TIME_FORMAT + public static final FastDateFormat ISO_8601_EXTENDED_TIME_FORMAT = FastDateFormat.getInstance("HH:mm:ss"); /** - * @deprecated - as of 4.0, ISO_TIME_NO_T_FORMAT will be replaced by ISO8601_TIME_FORMAT. + * @deprecated - as of 4.0, ISO_TIME_NO_T_FORMAT will be replaced by ISO_8601_EXTENDED_TIME_FORMAT. */ @Deprecated - public static final FastDateFormat ISO_TIME_NO_T_FORMAT = ISO8601_TIME_FORMAT; + public static final FastDateFormat ISO_TIME_NO_T_FORMAT = ISO_8601_EXTENDED_TIME_FORMAT; /** * ISO 8601 formatter for time with time zone. @@ -141,14 +141,14 @@ public class DateFormatUtils { * This format uses the default TimeZone in effect at the time of loading DateFormatUtils class. * @since 3.5 */ - public static final FastDateFormat ISO8601_TIME_TIME_ZONE_FORMAT + public static final FastDateFormat ISO_8601_EXTENDED_TIME_TIME_ZONE_FORMAT = FastDateFormat.getInstance("HH:mm:ssZZ"); /** - * @deprecated - as of 4.0, ISO_TIME_NO_T_TIME_ZONE_FORMAT will be replaced by ISO8601_TIME_TIME_ZONE_FORMAT. + * @deprecated - as of 4.0, ISO_TIME_NO_T_TIME_ZONE_FORMAT will be replaced by ISO_8601_EXTENDED_TIME_TIME_ZONE_FORMAT. */ @Deprecated - public static final FastDateFormat ISO_TIME_NO_T_TIME_ZONE_FORMAT = ISO8601_TIME_TIME_ZONE_FORMAT; + public static final FastDateFormat ISO_TIME_NO_T_TIME_ZONE_FORMAT = ISO_8601_EXTENDED_TIME_TIME_ZONE_FORMAT; /** * SMTP (and probably other) date headers. http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6d3796e6/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java b/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java index 36d080f..abb5198 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java @@ -57,7 +57,7 @@ import java.util.TimeZone; * This pattern letter can be used here (on all JDK versions).</p> * * <p>In addition, the pattern {@code 'ZZ'} has been made to represent - * ISO 8601 full format time zones (eg. {@code +08:00} or {@code -11:00}). + * ISO 8601 extended 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.</p> * http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6d3796e6/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java index 14c6d68..3f18cbc 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java @@ -61,7 +61,7 @@ import org.apache.commons.lang3.exception.ExceptionUtils; * This pattern letter can be used here (on all JDK versions).</p> * * <p>In addition, the pattern {@code 'ZZ'} has been made to represent - * ISO 8601 full format time zones (eg. {@code +08:00} or {@code -11:00}). + * ISO 8601 extended 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.</p> *
