Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E8E318B15 for ; Wed, 14 Oct 2015 10:50:06 +0000 (UTC) Received: (qmail 4287 invoked by uid 500); 14 Oct 2015 10:50:01 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 4206 invoked by uid 500); 14 Oct 2015 10:50:01 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 4193 invoked by uid 99); 14 Oct 2015 10:50:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2015 10:50:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B1388DFFCF; Wed, 14 Oct 2015 10:50:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: michaelo@apache.org To: commits@commons.apache.org Message-Id: <80461abcd97448788067687883bf2bbe@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [lang] LANG-1002: Several predefined ISO FastDateFormats in DateFormatUtils are incorrect Date: Wed, 14 Oct 2015 10:50:00 +0000 (UTC) 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 , 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 Authored: Wed Oct 14 12:46:08 2015 +0200 Committer: Michael Osipov 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).

* *

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.

* 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).

* *

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.

*