commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/time DateFormatUtils.java DateUtils.java
Date Wed, 06 Aug 2003 21:13:39 GMT
ggregory    2003/08/06 14:13:39

  Modified:    lang/src/test/org/apache/commons/lang/time
                        DurationFormatUtilsTest.java
                        DateFormatUtilsTest.java
               lang/src/java/org/apache/commons/lang/time
                        DateFormatUtils.java DateUtils.java
  Log:
  Replace statics *TIMEZONE* with *TIME_ZONE*
  
  Revision  Changes    Path
  1.4       +1 -1      jakarta-commons/lang/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
  
  Index: DurationFormatUtilsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DurationFormatUtilsTest.java	1 Aug 2003 00:12:32 -0000	1.3
  +++ DurationFormatUtilsTest.java	6 Aug 2003 21:13:39 -0000	1.4
  @@ -183,7 +183,7 @@
           cal.set(Calendar.MILLISECOND, 1);
           String text;
           // repeat a test from testDateTimeISO to compare extended and not extended.
  -        text = DateFormatUtils.ISO_DATETIME_TIMEZONE_FORMAT.format(cal);
  +        text = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format(cal);
           assertEquals("2002-02-23T09:11:12-03:00", text);
           // test fixture is the same as above, but now with extended format.
           text = DurationFormatUtils.ISO_EXTENDED_FORMAT.format(cal);
  
  
  
  1.3       +13 -12    jakarta-commons/lang/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
  
  Index: DateFormatUtilsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DateFormatUtilsTest.java	1 Aug 2003 00:12:32 -0000	1.2
  +++ DateFormatUtilsTest.java	6 Aug 2003 21:13:39 -0000	1.3
  @@ -70,6 +70,7 @@
    * @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author Stephen Colebourne
  + * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
    */
   public class DateFormatUtilsTest extends TestCase {
   
  @@ -112,12 +113,12 @@
           assertEquals("2002-02-23T09:11:12", text);
           
           text = DateFormatUtils.format(cal.getTime(), 
  -                      DateFormatUtils.ISO_DATETIME_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("2002-02-23T09:11:12-03:00", text);
           text = DateFormatUtils.format(cal.getTime().getTime(), 
  -                      DateFormatUtils.ISO_DATETIME_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("2002-02-23T09:11:12-03:00", text);
  -        text = DateFormatUtils.ISO_DATETIME_TIMEZONE_FORMAT.format(cal);
  +        text = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format(cal);
           assertEquals("2002-02-23T09:11:12-03:00", text);
       }
   
  @@ -135,12 +136,12 @@
           assertEquals("2002-02-23", text);
           
           text = DateFormatUtils.format(cal.getTime(), 
  -                      DateFormatUtils.ISO_DATE_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_DATE_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("2002-02-23-03:00", text);
           text = DateFormatUtils.format(cal.getTime().getTime(), 
  -                      DateFormatUtils.ISO_DATE_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_DATE_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("2002-02-23-03:00", text);
  -        text = DateFormatUtils.ISO_DATE_TIMEZONE_FORMAT.format(cal);
  +        text = DateFormatUtils.ISO_DATE_TIME_ZONE_FORMAT.format(cal);
           assertEquals("2002-02-23-03:00", text);
       }
   
  @@ -158,12 +159,12 @@
           assertEquals("T10:11:12", text);
           
           text = DateFormatUtils.format(cal.getTime(), 
  -                      DateFormatUtils.ISO_TIME_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_TIME_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("T10:11:12-03:00", text);
           text = DateFormatUtils.format(cal.getTime().getTime(), 
  -                      DateFormatUtils.ISO_TIME_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_TIME_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("T10:11:12-03:00", text);
  -        text = DateFormatUtils.ISO_TIME_TIMEZONE_FORMAT.format(cal);
  +        text = DateFormatUtils.ISO_TIME_TIME_ZONE_FORMAT.format(cal);
           assertEquals("T10:11:12-03:00", text);
       }
   
  @@ -181,12 +182,12 @@
           assertEquals("10:11:12", text);
           
           text = DateFormatUtils.format(cal.getTime(), 
  -                      DateFormatUtils.ISO_TIME_NO_T_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_TIME_NO_T_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("10:11:12-03:00", text);
           text = DateFormatUtils.format(cal.getTime().getTime(), 
  -                      DateFormatUtils.ISO_TIME_NO_T_TIMEZONE_FORMAT.getPattern(), timeZone);
  +                      DateFormatUtils.ISO_TIME_NO_T_TIME_ZONE_FORMAT.getPattern(), timeZone);
           assertEquals("10:11:12-03:00", text);
  -        text = DateFormatUtils.ISO_TIME_NO_T_TIMEZONE_FORMAT.format(cal);
  +        text = DateFormatUtils.ISO_TIME_NO_T_TIME_ZONE_FORMAT.format(cal);
           assertEquals("10:11:12-03:00", text);
       }
   
  
  
  
  1.6       +10 -9     jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateFormatUtils.java
  
  Index: DateFormatUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateFormatUtils.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DateFormatUtils.java	6 Aug 2003 02:48:23 -0000	1.5
  +++ DateFormatUtils.java	6 Aug 2003 21:13:39 -0000	1.6
  @@ -67,6 +67,7 @@
    * @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author Stephen Colebourne
  + * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
    * @since 2.0
    * @version $Id$
    */
  @@ -83,7 +84,7 @@
        * ISO8601 formatter for date-time with time zone.
        * The format used is <tt>yyyy-MM-dd'T'HH:mm:ssZZ</tt>.
        */
  -    public static final FastDateFormat ISO_DATETIME_TIMEZONE_FORMAT
  +    public static final FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT
               = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ssZZ");
   
       /**
  @@ -99,7 +100,7 @@
        * This pattern does not comply with the formal ISO8601 specification
        * as the standard does not allow a time zone  without a time.
        */
  -    public static final FastDateFormat ISO_DATE_TIMEZONE_FORMAT
  +    public static final FastDateFormat ISO_DATE_TIME_ZONE_FORMAT
               = FastDateFormat.getInstance("yyyy-MM-ddZZ");
   
       /**
  @@ -113,7 +114,7 @@
        * ISO8601 formatter for time with time zone.
        * The format used is <tt>'T'HH:mm:ssZZ</tt>.
        */
  -    public static final FastDateFormat ISO_TIME_TIMEZONE_FORMAT
  +    public static final FastDateFormat ISO_TIME_TIME_ZONE_FORMAT
               = FastDateFormat.getInstance("'T'HH:mm:ssZZ");
   
       /**
  @@ -131,7 +132,7 @@
        * This pattern does not comply with the formal ISO8601 specification
        * as the standard requires the 'T' prefix for times.
        */
  -    public static final FastDateFormat ISO_TIME_NO_T_TIMEZONE_FORMAT
  +    public static final FastDateFormat ISO_TIME_NO_T_TIME_ZONE_FORMAT
               = FastDateFormat.getInstance("HH:mm:ssZZ");
   
       /**
  @@ -159,7 +160,7 @@
        * @return the formatted date
        */
       public static String formatUTC(long millis, String pattern) {
  -        return format(new Date(millis), pattern, DateUtils.UTC_TIMEZONE, null);
  +        return format(new Date(millis), pattern, DateUtils.UTC_TIME_ZONE, null);
       }
   
       /**
  @@ -170,7 +171,7 @@
        * @return the formatted date
        */
       public static String formatUTC(Date date, String pattern) {
  -        return format(date, pattern, DateUtils.UTC_TIMEZONE, null);
  +        return format(date, pattern, DateUtils.UTC_TIME_ZONE, null);
       }
       
       /**
  @@ -182,7 +183,7 @@
        * @return the formatted date
        */
       public static String formatUTC(long millis, String pattern, Locale locale) {
  -        return format(new Date(millis), pattern, DateUtils.UTC_TIMEZONE, locale);
  +        return format(new Date(millis), pattern, DateUtils.UTC_TIME_ZONE, locale);
       }
   
       /**
  @@ -194,7 +195,7 @@
        * @return the formatted date
        */
       public static String formatUTC(Date date, String pattern, Locale locale) {
  -        return format(date, pattern, DateUtils.UTC_TIMEZONE, locale);
  +        return format(date, pattern, DateUtils.UTC_TIME_ZONE, locale);
       }
       
       /**
  
  
  
  1.10      +3 -2      jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java
  
  Index: DateUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DateUtils.java	6 Aug 2003 01:44:57 -0000	1.9
  +++ DateUtils.java	6 Aug 2003 21:13:39 -0000	1.10
  @@ -72,6 +72,7 @@
    * @author <a href="mailto:sergek@lokitech.com">Serge Knystautas</a>
    * @author Stephen Colebourne
    * @author Janek Bogucki
  + * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
    * @since 2.0
    * @version $Id$
    */
  @@ -80,7 +81,7 @@
       /**
        * The UTC time zone  (often referred to as GMT).
        */
  -    public static final TimeZone UTC_TIMEZONE = TimeZone.getTimeZone("GMT");
  +    public static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("GMT");
       /**
        * Number of milliseconds in a standard second.
        */
  
  
  

Mime
View raw message