Parse date string input with Default Locale Canada in Java
Description
The following code shows how to parse date string input with Default Locale Canada.
Example
//from w ww . jav a 2 s.c o m
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
public class Main {
public static void main(String[] argv) throws Exception {
Date date = DateFormat.getTimeInstance(DateFormat.DEFAULT, Locale.CANADA).parse("21.33.03");
System.out.println(date);
}
}
The code above generates the following result.