From 7858c20d21eb6ed9ee0a85dafd8d8695e93f62dd Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sun, 15 Aug 2010 16:57:27 +0200 Subject: [PATCH] Small fixes. --- src/fr/devinsy/util/DateHelper.java | 6 +++++- src/fr/devinsy/util/DateTimeHelper.java | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/fr/devinsy/util/DateHelper.java b/src/fr/devinsy/util/DateHelper.java index bdccd42..1aa7513 100755 --- a/src/fr/devinsy/util/DateHelper.java +++ b/src/fr/devinsy/util/DateHelper.java @@ -44,6 +44,10 @@ public class DateHelper } else { + System.out.println("============= " + time); + System.out.println("============= " + time.get(Calendar.DAY_OF_MONTH)); + System.out.println("============= " + time.get(Calendar.MONTH) + 1); + System.out.println("============= " + time.get(Calendar.YEAR)); result = String.format (EUROPEAN_DATE_FORMAT, time.get(Calendar.DAY_OF_MONTH), time.get(Calendar.MONTH) + 1, time.get(Calendar.YEAR)); } @@ -107,7 +111,7 @@ public class DateHelper } else { - result = String.format (RAW_DATE_FORMAT, time.get(Calendar.MONTH), time.get(Calendar.DAY_OF_MONTH) + 1, time.get(Calendar.YEAR)); + result = String.format (RAW_DATE_FORMAT, time.get(Calendar.YEAR), time.get(Calendar.MONTH), time.get(Calendar.DAY_OF_MONTH) + 1); } // diff --git a/src/fr/devinsy/util/DateTimeHelper.java b/src/fr/devinsy/util/DateTimeHelper.java index 259d8cd..81af9e9 100755 --- a/src/fr/devinsy/util/DateTimeHelper.java +++ b/src/fr/devinsy/util/DateTimeHelper.java @@ -65,9 +65,9 @@ public class DateTimeHelper } else { - result = String.format (ISO_DATE_FORMAT, time.get(Calendar.DAY_OF_MONTH), + result = String.format (ISO_DATE_FORMAT, time.get(Calendar.YEAR), time.get(Calendar.MONTH) + 1, - time.get(Calendar.YEAR), + time.get(Calendar.DAY_OF_MONTH), time.get(Calendar.HOUR_OF_DAY), time.get(Calendar.MINUTE), time.get(Calendar.SECOND)); @@ -91,8 +91,8 @@ public class DateTimeHelper } else { - result = String.format (AMERICAN_DATE_FORMAT, time.get(Calendar.DAY_OF_MONTH), - time.get(Calendar.MONTH) + 1, + result = String.format (AMERICAN_DATE_FORMAT, time.get(Calendar.MONTH) + 1, + time.get(Calendar.DAY_OF_MONTH), time.get(Calendar.YEAR), time.get(Calendar.HOUR_OF_DAY), time.get(Calendar.MINUTE), @@ -117,9 +117,9 @@ public class DateTimeHelper } else { - result = String.format (RAW_DATE_FORMAT, time.get(Calendar.DAY_OF_MONTH), + result = String.format (RAW_DATE_FORMAT, time.get(Calendar.YEAR), time.get(Calendar.MONTH) + 1, - time.get(Calendar.YEAR), + time.get(Calendar.DAY_OF_MONTH), time.get(Calendar.HOUR_OF_DAY), time.get(Calendar.MINUTE), time.get(Calendar.SECOND));