<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.2">
</HEAD>
<BODY>
Hello, <BR>
 the default date format is &quot;dd-MMM-yyyy&quot;<BR>
if you want to change there is a property to change drools.dateformat<BR>
you can set it like this <BR>
System.setProperty( &quot;drools.dateformat&quot;, &quot;dd/MM/YYYY&quot; );<BR>
you can also set the the next properties like this <BR>
System.setProperty( &quot;drools.defaultlanguage&quot;, &quot;en&quot; );<BR>
System.setProperty( &quot;drools.defaultcountry&quot; ,&quot;US&quot; );<BR>
that will override the default settings which are &quot;en&quot; and &quot;US&quot;<BR>
regards<BR>
Nicolas H&#233;ron<BR>
<BR>
Le mercredi 01 avril 2009 &#224; 09:33 -0700, Greg Barton a &#233;crit :
<BLOCKQUOTE TYPE=CITE>
<PRE>
You would have to set the default Locale of the JRE.

Either call Locale.setDefault(Locale.US) (class java.util.Locale) before you parse any dates, or launch java with the user.country property set to US.

For more than you'd ever want to know about Locales, see this: <A HREF="http://java.sun.com/docs/books/tutorial/i18n/locale/index.html">http://java.sun.com/docs/books/tutorial/i18n/locale/index.html</A>

--- On Wed, 4/1/09, Zeke &lt;<A HREF="mailto:xanadu860122@gmail.com">xanadu860122@gmail.com</A>&gt; wrote:

&gt; From: Zeke &lt;<A HREF="mailto:xanadu860122@gmail.com">xanadu860122@gmail.com</A>&gt;
&gt; Subject: [rules-users] Date format [MMM-dd-yyyy] can NOT work in Chinese environment. How to set locale or language of drools?
&gt; To: &quot;rules-users&quot; &lt;<A HREF="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A>&gt;
&gt; Date: Wednesday, April 1, 2009, 11:11 AM
&gt; Hi, Friends:
&gt;   I am using Drools 4.0.7. I set the date format as
&gt; [MMM-dd-yyyy], My
&gt; machine locale is China, and the language is Chinese. I
&gt; find that if I have
&gt; a rule like &quot;when date &gt; Jan-01-2009&quot;, drools
&gt; will throw exception like
&gt; &quot;Jan-01-2009 does not follow [MMM-dd-yyyy]&quot;. But
&gt; if I change &quot;Jan&quot; to
&gt; Chinese charactor which is &quot;&#19968;&#26376;&quot;,  runtime
&gt; will be OK.  So I think it is a
&gt; locale/language issue.
&gt;   Is there anyway to set locale/language of drools? That is
&gt; even if my
&gt; environment is Chinese, I still can use the English date
&gt; format? Or is there
&gt; any other way can help me out?
&gt; 
&gt; Thanks
&gt; - Zeke
&gt; _______________________________________________
&gt; rules-users mailing list
&gt; <A HREF="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A>
&gt; <A HREF="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A>


      

_______________________________________________
rules-users mailing list
<A HREF="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A>
<A HREF="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>