diff options
author | Duong Nguyen <dnguyen> | 2008-01-09 22:09:14 +0000 |
---|---|---|
committer | Duong Nguyen <dnguyen> | 2008-01-09 22:09:14 +0000 |
commit | 2db5f53ca8f48635f44e458f0262bcbbc4b447db (patch) | |
tree | f1646a776d55119c890bf11b65d441f83ee38924 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java | |
parent | 30433b5816e278f51a09cee9f6a6c7ae1e02382c (diff) | |
download | eclipse.platform.swt-2db5f53ca8f48635f44e458f0262bcbbc4b447db.tar.gz eclipse.platform.swt-2db5f53ca8f48635f44e458f0262bcbbc4b447db.tar.xz eclipse.platform.swt-2db5f53ca8f48635f44e458f0262bcbbc4b447db.zip |
Removed Calendar from getNameText -- just print the text without formatting
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java index a266fd02e0..2766aa6b53 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java @@ -420,10 +420,8 @@ public int getMonth () { } String getNameText() { - Calendar cal = Calendar.getInstance(); - cal.set(getYear(), getMonth(), getDay(), - getHours(), getMinutes(), getSeconds()); - return cal.getTime().toString(); + return (style & SWT.TIME) != 0 ? getHours() + ":" + getMinutes() + ":" + getSeconds() + : (getMonth() + 1) + "/" + getDay() + "/" + getYear(); } /** |