The fix supports text in the format defined by DateFormatSymbols, all 
upper case and all lower case. It does not suuport weird mixed case 
examples like jAN.

Stephen


Ian McCall wrote:
> I'm having a problem with case sensitivity in JodaTime 1.5.2. This can  
> be reproduced with the following test class:
> 
> 
> package com.astirion.jodatime.caseproblem;
> 
> import org.joda.time.LocalDate;
> import org.joda.time.format.DateTimeFormat;
> import org.joda.time.format.DateTimeFormatter;
> 
> public class JodaTimeCaseProblem {
> 
>       public static void main(String[] args) {
>               parseDate("dd-MMM-y", "28-Jan-1972");
>               parseDate("dd-MMM-y", "28-jAN-1972");
>       }
> 
>       private static void parseDate(String pattern, String dateText) {
>               DateTimeFormatter formatter = 
> DateTimeFormat.forPattern(pattern);
>               String logTextStem = String.format("%s with text %s", pattern,  
> dateText);
>               
>               try {
>                       LocalDate date = 
> formatter.parseDateTime(dateText).toLocalDate();
>                       System.out.println(logTextStem + " produced " + date);
>               } catch(Exception e) {
>                       System.err.println(logTextStem + " produced an 
> exception");
>                       e.printStackTrace();
>               }
>       }
> }
> 
> 
> The first date will go through as expected. The second, 28-jAN-1972,  
> will throw an exception.
> 
> I've found this message in the archive:
> http://sourceforge.net/mailarchive/message.php?msg_id=475D87B3.50701%40joda.org
> 
> ...which states this problem was fixed in 1.5.1. Is anyone else having  
> this trouble in 1.5.2?
> 
> 
> 
> Cheer,
> Ian
> 
> 
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
> 

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to