aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2013-06-26 09:51:33 (EDT)
committerDirk Fauth2013-06-26 09:51:33 (EDT)
commitbe1bdf09c0a363b62c8f0f391d6b08c2bc204028 (patch)
tree1b0bc0369822275329ab6373967676e359ada53e
parent5179eeccf4b65abaca5b3aa7969b739d5b631191 (diff)
downloadorg.eclipse.nebula-be1bdf09c0a363b62c8f0f391d6b08c2bc204028.zip
org.eclipse.nebula-be1bdf09c0a363b62c8f0f391d6b08c2bc204028.tar.gz
org.eclipse.nebula-be1bdf09c0a363b62c8f0f391d6b08c2bc204028.tar.bz2
Added convenience getDate() method that takes a java.util.Date object as
parameter
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/DateHelper.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/DateHelper.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/DateHelper.java
index 7cf2598..b32cfeb 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/DateHelper.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/DateHelper.java
@@ -201,6 +201,12 @@ public class DateHelper {
return ret;
}
+ public static String getDate(Date date, String dateFormat) {
+ Calendar cal = Calendar.getInstance(_locale);
+ cal.setTime(date);
+ return getDate(cal, dateFormat);
+ }
+
public static String getDate(Calendar cal, String dateFormat) {
//Calendar toUse = (Calendar) cal.clone();
Calendar toUse = Calendar.getInstance(_locale);