Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-11-10 20:28:39 -0500
committermkersten2005-11-10 20:28:39 -0500
commitdbd27cd944dfb3b7287e658455c56d7b2df37037 (patch)
treea33ed0441fdfa21fc32d1583ca4a6c1ed40625f6 /org.eclipse.mylyn.tasks.ui
parent96589a5d9103e130901f35a52fe445897376f97b (diff)
downloadorg.eclipse.mylyn.tasks-dbd27cd944dfb3b7287e658455c56d7b2df37037.tar.gz
org.eclipse.mylyn.tasks-dbd27cd944dfb3b7287e658455c56d7b2df37037.tar.xz
org.eclipse.mylyn.tasks-dbd27cd944dfb3b7287e658455c56d7b2df37037.zip
Patch for Bug 114435: calendar month off-by-one
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/contribution/DatePicker.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/contribution/DatePicker.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/contribution/DatePicker.java
index 6f87cda1f..fe0fcdb7a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/contribution/DatePicker.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/contribution/DatePicker.java
@@ -11,8 +11,10 @@
package org.eclipse.mylar.tasklist.contribution;
+import java.text.DateFormat;
import java.text.DateFormatSymbols;
import java.util.Calendar;
+import java.util.Date;
import java.util.GregorianCalendar;
import org.eclipse.swt.SWT;
@@ -47,7 +49,7 @@ import org.eclipse.swt.widgets.Text;
* @author Mik Kersten
*/
public class DatePicker extends Composite {
-
+
private Text dateText = null;
private Button pickButton = null;
@@ -143,8 +145,8 @@ public class DatePicker extends Composite {
}
private void updateDateText() {
- dateText.setText(date.get(Calendar.DAY_OF_MONTH) + "/"
- + date.get(Calendar.MONTH) + "/" + date.get(Calendar.YEAR));
+ Date currentDate = new Date(date.getTimeInMillis());
+ dateText.setText(DateFormat.getDateInstance(DateFormat.SHORT).format(currentDate));
}
public void setDateText(String text) {

Back to the top