commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/time DateUtils.java
Date Sun, 27 Jun 2004 06:29:29 GMT
bayard      2004/06/26 23:29:29

  Modified:    lang/src/java/org/apache/commons/lang/time DateUtils.java
  Log:
  flipped from being hardcoded to GregorianCalendar to using getInstance. Cannot think of
any reason why a GregorianCalendar was being created directly
  
  Revision  Changes    Path
  1.19      +4 -5      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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DateUtils.java	18 Feb 2004 22:56:42 -0000	1.18
  +++ DateUtils.java	27 Jun 2004 06:29:29 -0000	1.19
  @@ -17,7 +17,6 @@
   
   import java.util.Calendar;
   import java.util.Date;
  -import java.util.GregorianCalendar;
   import java.util.Iterator;
   import java.util.NoSuchElementException;
   import java.util.TimeZone;
  @@ -134,7 +133,7 @@
           if (date == null) {
               throw new IllegalArgumentException("The date must not be null");
           }
  -        GregorianCalendar gval = new GregorianCalendar();
  +        Calendar gval = Calendar.getInstance();
           gval.setTime(date);
           modify(gval, field, true);
           return gval.getTime();
  @@ -214,7 +213,7 @@
           if (date == null) {
               throw new IllegalArgumentException("The date must not be null");
           }
  -        GregorianCalendar gval = new GregorianCalendar();
  +        Calendar gval = Calendar.getInstance();
           gval.setTime(date);
           modify(gval, field, false);
           return gval.getTime();
  @@ -502,7 +501,7 @@
           if (focus == null) {
               throw new IllegalArgumentException("The date must not be null");
           }
  -        GregorianCalendar gval = new GregorianCalendar();
  +        Calendar gval = Calendar.getInstance();
           gval.setTime(focus);
           return iterator(gval, rangeStyle);
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message