Small fixes.

This commit is contained in:
Christian P. MOMON 2010-08-15 16:57:27 +02:00
parent 71bf40fedc
commit 7858c20d21
2 changed files with 11 additions and 7 deletions

View file

@ -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);
}
//

View file

@ -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));