aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni.koivuviita@itmill.com>2007-07-09 12:44:57 +0000
committerJouni Koivuviita <jouni.koivuviita@itmill.com>2007-07-09 12:44:57 +0000
commit911cb83de60dea77958949ac41b943a0afa602bd (patch)
treec30c4467a3ff7b24018a9fd39289a50eb1177ef3 /src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java
parent102cda5b1bbe1f35030bffe23b959f88b5ab5c5c (diff)
downloadvaadin-framework-911cb83de60dea77958949ac41b943a0afa602bd.tar.gz
vaadin-framework-911cb83de60dea77958949ac41b943a0afa602bd.zip
DateField calendar style client-side implemetation fully functional. DateField now doesn't require a repaint after every value change, it supposes that the client is smart enough to update the view on its own.
Fixed locale loading and parsing (now supports all possible locales found from JVM). svn changeset:1821/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java b/src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java
index a5781c2fe5..7e92ff80a3 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/DateTimeService.java
@@ -92,6 +92,39 @@ public class DateTimeService {
return 0;
}
+ public boolean isTwelveHourClock() {
+ try {
+ return LocaleService.isTwelveHourClock(currentLocale);
+ } catch (LocaleNotLoadedException e) {
+ // TODO redirect to console
+ System.out.println(e + ":" + e.getMessage());
+ }
+ return false;
+ }
+
+ public String getClockDelimeter() {
+ try {
+ return LocaleService.getClockDelimiter(currentLocale);
+ } catch (LocaleNotLoadedException e) {
+ // TODO redirect to console
+ System.out.println(e + ":" + e.getMessage());
+ }
+ return ":";
+ }
+
+ public String[] getAmPmStrings() {
+ try {
+ return LocaleService.getAmPmStrings(currentLocale);
+ } catch (LocaleNotLoadedException e) {
+ // TODO redirect to console
+ System.out.println(e + ":" + e.getMessage());
+ }
+ String[] temp = new String[2];
+ temp[0] = "AM";
+ temp[1] = "PM";
+ return temp;
+ }
+
public int getStartWeekDay(Date date){
Date dateForFirstOfThisMonth = new Date(date.getYear(), date.getMonth(), 1);
int firstDay;