Author: michiel
Date: 2010-03-11 12:35:18 +0100 (Thu, 11 Mar 2010)
New Revision: 41332

Modified:
   
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/util/DateTime.java
Log:
it's a giant WTF

Modified: 
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/util/DateTime.java
===================================================================
--- 
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/util/DateTime.java
  2010-03-11 11:05:26 UTC (rev 41331)
+++ 
mmbase/trunk/applications/vpro-wizards/src/main/java/org/mmbase/applications/vprowizards/spring/util/DateTime.java
  2010-03-11 11:35:18 UTC (rev 41332)
@@ -6,7 +6,7 @@
 The license (Mozilla version 1.0) can be read at the MMBase site.
 See http://www.MMBase.org/license
 
-*/ 
+*/
 package org.mmbase.applications.vprowizards.spring.util;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -18,28 +18,28 @@
 /**
  * @author ebunders
  * this class is a bean for storing a date and a time.
- * They are separate becouse you may want to use different input fields in the 
+ * They are separate becouse you may want to use different input fields in the
  * html form.
  * You can set the date formate for date and time separetely. default is: 
dd-MM-yyyy kk:mm:ss
  *
  */
 public class DateTime {
     private String dateFormat = "dd-MM-yyyy";
-    private String timeFormat = "kk:mm:ss";
-    
+    private String timeFormat = "HH:mm:ss";
+
     private static final Logger log = 
Logging.getLoggerInstance(DateTime.class);
-    
+
     private SimpleDateFormat sdf = new SimpleDateFormat(dateFormat  + 
timeFormat);
-    
-    
-    private String date;
-    private String time;
-    
+
+
+    private String date = "";
+    private String time = "";
+
     public String getDate() {
         return date;
     }
     public void setDate(String date) {
-        log.info("setting date to "+date);
+        log.debug("setting date to " + date);
         this.date = date;
     }
     public String getTime() {
@@ -48,28 +48,28 @@
     public void setTime(String time) {
         this.time = time;
     }
-    
+
     public Date getParsedDate() throws ParseException{
         return sdf.parse(date + time);
     }
-    
+
     public long getDateInSeconds() throws ParseException {
         return  getParsedDate().getTime()/1000;
     }
-    
+
     public String toString(){
         String result = date  + time;
-        
+
         try {
             result = getParsedDate().toString();
         } catch (ParseException e) {
             result += " unparseable";
         }
-        
+
         return result;
     }
-    
-    
+
+
     /**
      * override the date format string. a new dateformat object is created
      * @param dateFormat
@@ -78,7 +78,7 @@
         this.dateFormat = dateFormat;
         sdf = new SimpleDateFormat(dateFormat  + timeFormat);
     }
-    
+
     /**
      * override the time format string. a new dateformat object is created
      * @param timeFormat

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to