|
Re: EDate property. input format not Locale.ENGLISH [message #485125 is a reply to message #484985] |
Thu, 10 September 2009 14:49 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Urs,
Comments below.
Urs Frei wrote:
> Hello
>
> I have an EDate member in my ecore model. In the property view I have to
> input a date in the format like this:
>
> new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ"),
> new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS"),
> new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"),
> new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm"),
> new SafeSimpleDateFormat("yyyy-MM-dd")
>
> But I would like to have a German format. Is there a way to change the
> configuration? The definition for the format is in the class
> org.eclipse.emf.ecore.impl.EFactoryImpl
>
> And the SaveSimpleDateFormat is configured to
> public SafeSimpleDateFormat(String pattern){
> super(pattern, Locale.ENGLISH);
> }
>
> The only way I found is to replace the element in the member EDATE_FORMATS.
> But I think it is not the perfect solution.
>
That's a terrible solution because it will definitely break other
clients of EMF. Best to create your own EDataType and then you can do
whatever you want with it in terms of converting it between a string and
a value.
> Have you any other ideas?
>
> Thank you
>
> Urs
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02428 seconds