commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1663342 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
Date Mon, 02 Mar 2015 16:10:35 GMT
Author: sebb
Date: Mon Mar  2 16:10:35 2015
New Revision: 1663342

URL: http://svn.apache.org/r1663342
Log:
Docs

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java?rev=1663342&r1=1663341&r2=1663342&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
Mon Mar  2 16:10:35 2015
@@ -486,9 +486,9 @@ public class FastDateParser implements D
             return DAY_OF_WEEK_IN_MONTH_STRATEGY;
         case 'G':
             return getLocaleSpecificStrategy(Calendar.ERA, definingCalendar);
-        case 'H':
+        case 'H':  // Hour in day (0-23)
             return MODULO_HOUR_OF_DAY_STRATEGY;
-        case 'K':
+        case 'K':  // Hour in am/pm (0-11) 
             return HOUR_STRATEGY;
         case 'M':
             return formatField.length()>=3 ?getLocaleSpecificStrategy(Calendar.MONTH,
definingCalendar) :NUMBER_MONTH_STRATEGY;
@@ -500,9 +500,9 @@ public class FastDateParser implements D
             return getLocaleSpecificStrategy(Calendar.AM_PM, definingCalendar);
         case 'd':
             return DAY_OF_MONTH_STRATEGY;
-        case 'h':
+        case 'h':  // Hour in am/pm (1-12), i.e. midday/midnight is 12, not 0
             return MODULO_HOUR_STRATEGY;
-        case 'k':
+        case 'k':  // Hour in day (1-24), i.e. midnight is 24, not 0
             return HOUR_OF_DAY_STRATEGY;
         case 'm':
             return MINUTE_STRATEGY;



Mime
View raw message