- Log.d("globals", String.format("Parsing date '%s'", toParse));
- return ledgerDateFormatter.parse(toParse);
+ assert dayStr != null;
+ day = Integer.parseInt(dayStr);
+
+ return new SimpleDate(year, month, day);
+ }
+ public static Calendar parseLedgerDateAsCalendar(String dateString) throws ParseException {
+ return parseLedgerDate(dateString).toCalendar();
+ }
+ public static SimpleDate parseIsoDate(String dateString) throws ParseException {
+ return SimpleDate.fromDate(isoDateFormatter.get().parse(dateString));
+ }
+ public static String formatLedgerDate(SimpleDate date) {
+ return dateFormatter.get().format(date.toDate());