Time library for gwt

I am working on a gwt application that includes advanced date manipulations: convert from one time zone to another, etc. Gwt has some low-level materials for working with dates, but they are too low for me. Are there any options similar to joda or threeten time for gwt?

+12
jodatime gwt
Apr 25 2018-12-12T00:
source share
2 answers
+4
Apr 25 '12 at 9:26
source share

This is my DateTimeUtil class

public class DateTimeUtil { public static String getYear(Date date) { return DateTimeFormat.getFormat("yyyy").format(date); } public static String getMonth(Date date) { return DateTimeFormat.getFormat("MM").format(date); } public static String getDay(Date date) { return DateTimeFormat.getFormat("dd").format(date); } public static String getHour(Date date) { return DateTimeFormat.getFormat("HH").format(date); } public static String getMinute(Date date) { return DateTimeFormat.getFormat("mm").format(date); } public static String getSecond(Date date) { return DateTimeFormat.getFormat("ss").format(date); } // The String year must to have yyyy format public static Date getDate(String years, String months, String days, String hours, String minutes, String seconds) { DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss"); Date date = dtf.parse(years + "-" + months + "-" + days + " " + hours + ":" + minutes + ":" + seconds); GWT.log("date parsed " + date); return date; } } 
+1
Dec 08 '14 at 22:31
source share