How to control the environmental format of SimpleDateFormat

Hi,
I'm using SimpleDateFormat in this way wherever I 'go':
   /**
    *  Returns the <b>given</b> date formatted as <b>dd-MMM-yyyy</b> (day-month-year).
    *
    * @param d the date to be formatted.
    * @return the formatted result as a String.
    */
   public static String getDate(Date d)
   {
      return(new SimpleDateFormat("dd-MMM-yyyy").format(d));
   }
However, on certain machines this gives "19-Oct-2004" (what I prefer),
on other machines "19-okt-2004" or worse, due to international settings.
For various reasons I want to standardise on the 'English' format.
How do I force these things?
;JOOP!
LVL 24
sciuriwareAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
objectsConnect With a Mentor Commented:
try specifying the Locale in the SDF ctor.
0
 
sciuriwareAuthor Commented:
The first, the correct, the shortest and the abbreviated answer, always from YOU!
Do you ever sleep?








:>)
0
 
objectsCommented:
:)
0
All Courses

From novice to tech pro — start learning today.