Results 1 to 2 of 2
  1. #1
    kopros is offline Member
    Join Date
    Dec 2007
    Posts
    5
    Rep Power
    0

    Default Calendar language problem

    hi I have this method

    private void processPeriod(int per_id, String str) {
    String s[] = str.split(",");
    Calendar ts = GregorianCalendar.getInstance();
    SimpleDateFormat d = new SimpleDateFormat("dd:MM:yyyy HH:mm:ss");
    try {
    ts.setTimeInMillis(d.parse(s[0] + s[1]).getTime());
    } catch (ParseException pe) {
    pe.printStackTrace();
    }
    Period period = new Period();
    period.setId(per_id);
    period.setTimestamp(ts);
    period.setDuration(Integer.parseInt(s[2].trim()));
    period.setPenalty(Integer.parseInt(s[3].trim()));
    periods.add(period);
    }

    whitc takes from a file this string "15:12:2005, 07:55:00, 180, 0" and save it i a period instance. The problem is that when I try to show these data in a table it shows them in Greek and not in English...

    for ex. 15:12:2005 is 15 Δεκεμβριος 2005 instead of 15 December 2005

    any solution??

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default

    Looks like you may have a Greekorian Calendar instead of a Gregorian one ;) Just joking, of course.

    What are your system settings? Greek or English?

    db

Similar Threads

  1. calendar
    By John in forum SWT / JFace
    Replies: 12
    Last Post: 08-07-2008, 11:54 PM
  2. How to use Calendar class
    By JavaBean in forum Java Tip
    Replies: 1
    Last Post: 06-26-2008, 04:09 PM
  3. How to Show Calendar
    By praveen.kb in forum AWT / Swing
    Replies: 2
    Last Post: 02-09-2008, 09:23 AM
  4. Problem with calendar
    By Felissa in forum Advanced Java
    Replies: 2
    Last Post: 07-01-2007, 09:39 PM
  5. Web calendar
    By Daniel in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 06-27-2007, 06:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •