@Test public void testFromStandardDate() { String date = "2013-05-01"; int[] expected = new int[]{2013, 5, 1}; int[] actual = DateUtils.fromStandardDate(date); assertArrayEquals(expected, actual); date = "2013-11-12"; expected = new int[]{2013, 11, 12}; actual = DateUtils.fromStandardDate(date); assertArrayEquals(expected, actual); date = "1990-05-30"; expected = new int[]{1990, 5, 30}; actual = DateUtils.fromStandardDate(date); assertArrayEquals(expected, actual); date = "1990-11-01"; expected = new int[]{1990, 11, 1}; actual = DateUtils.fromStandardDate(date); assertArrayEquals(expected, actual); }
public static int[] fromStandardDate(String standardDate) { int[] parts = new int[3]; String[] sParts = standardDate.split("-"); for (int i = 0; i < sParts.length; ++i) { parts[i] = Integer.parseInt(sParts[i]); } return parts; }
DateUtils { public static int[] fromStandardDate(String standardDate) { int[] parts = new int[3]; String[] sParts = standardDate.split("-"); for (int i = 0; i < sParts.length; ++i) { parts[i] = Integer.parseInt(sParts[i]); } return parts; } }
DateUtils { public static int[] fromStandardDate(String standardDate) { int[] parts = new int[3]; String[] sParts = standardDate.split("-"); for (int i = 0; i < sParts.length; ++i) { parts[i] = Integer.parseInt(sParts[i]); } return parts; }  }
DateUtils { public static int[] fromStandardDate(String standardDate) { int[] parts = new int[3]; String[] sParts = standardDate.split("-"); for (int i = 0; i < sParts.length; ++i) { parts[i] = Integer.parseInt(sParts[i]); } return parts; }  static String toStandardDate(int year, int month, int day); static int[] fromStandardDate(String standardDate); }
DateUtils { public static int[] fromStandardDate(String standardDate) { int[] parts = new int[3]; String[] sParts = standardDate.split("-"); for (int i = 0; i < sParts.length; ++i) { parts[i] = Integer.parseInt(sParts[i]); } return parts; }  static String toStandardDate(int year, int month, int day); static int[] fromStandardDate(String standardDate);  }