Mercurial > projects > dwt2
annotate com.ibm.icu/src/com/ibm/icu/text/DateFormat.d @ 104:88652073d1c2
More work on icu
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 02 May 2009 11:27:24 +0200 |
parents | 48d4ee626868 |
children |
rev | line source |
---|---|
85 | 1 module com.ibm.icu.text.DateFormat; |
2 | |
3 import java.lang.all; | |
4 import java.text.ParsePosition; | |
5 import java.util.Date; | |
6 | |
98
48d4ee626868
rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents:
92
diff
changeset
|
7 import com.ibm.icu.mangoicu.UDateFormat; |
104 | 8 import com.ibm.icu.mangoicu.ULocale; |
9 import com.ibm.icu.mangoicu.UTimeZone; | |
98
48d4ee626868
rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents:
92
diff
changeset
|
10 |
85 | 11 public class DateFormat { |
12 | |
104 | 13 public static const int LONG = UDateFormat.Style.Long; |
14 public static const int FULL = UDateFormat.Style.Full; | |
15 public static const int SHORT = UDateFormat.Style.Short; | |
98
48d4ee626868
rm databinding.observable seems to be duplicate, databinding.beans now building
Frank Benoit <benoit@tionex.de>
parents:
92
diff
changeset
|
16 public static const int MEDIUM = UDateFormat.Style.Medium; |
85 | 17 |
104 | 18 private UDateFormat ufmt; |
19 private this( UDateFormat.Style time ){ | |
20 ufmt = new UDateFormat( time, time, ULocale.Default, UTimeZone.Default, null ); | |
21 } | |
22 private this( UDateFormat ufmt ){ | |
23 this.ufmt = ufmt; | |
24 } | |
25 | |
26 public static DateFormat getTimeInstance() { | |
27 // FIXME | |
28 return new DateFormat( UDateFormat.Style.Long ); | |
29 } | |
30 | |
31 public static DateFormat getTimeInstance(int s) { | |
32 // FIXME | |
33 return new DateFormat( UDateFormat.Style.Long ); | |
34 implMissing(__FILE__, __LINE__); | |
35 return null; | |
36 } | |
37 | |
85 | 38 public static DateFormat getDateInstance() { |
104 | 39 // FIXME |
40 return new DateFormat( UDateFormat.Style.Long ); | |
41 implMissing(__FILE__, __LINE__); | |
42 return null; | |
43 } | |
44 | |
45 public static DateFormat getDateTimeInstance(int l, int m) { | |
46 // FIXME | |
47 return new DateFormat( UDateFormat.Style.Long ); | |
48 implMissing(__FILE__, __LINE__); | |
49 return null; | |
50 } | |
51 | |
52 public static DateFormat getDateInstance(int dateFormat) { | |
53 // FIXME | |
54 return new DateFormat( UDateFormat.Style.Long ); | |
92
ebefa5c2eab4
moving ICU bindings to com.ibm.icu
Frank Benoit <benoit@tionex.de>
parents:
85
diff
changeset
|
55 implMissing(__FILE__, __LINE__); |
85 | 56 return null; |
57 } | |
58 | |
59 public String format(Date date) { | |
92
ebefa5c2eab4
moving ICU bindings to com.ibm.icu
Frank Benoit <benoit@tionex.de>
parents:
85
diff
changeset
|
60 implMissing(__FILE__, __LINE__); |
85 | 61 return null; |
62 } | |
63 | |
104 | 64 public String format(Long long2) { |
92
ebefa5c2eab4
moving ICU bindings to com.ibm.icu
Frank Benoit <benoit@tionex.de>
parents:
85
diff
changeset
|
65 implMissing(__FILE__, __LINE__); |
85 | 66 return null; |
67 } | |
68 | |
69 public Date parse(String str, ParsePosition pos) { | |
92
ebefa5c2eab4
moving ICU bindings to com.ibm.icu
Frank Benoit <benoit@tionex.de>
parents:
85
diff
changeset
|
70 implMissing(__FILE__, __LINE__); |
85 | 71 return null; |
72 } | |
73 | |
74 } | |
75 | |
76 |