×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    6

    Angry cal.get(Calendar.HOUR) problem

    The problem is I am making a clock program but have hit a hurdle which is that it seems that on some phones

    cal.get(Calendar.HOUR)

    gives the values 0...11 but on other phones like my Nokia 3100 it gives the values 1...12.

    I want my program to be as compatable as possible but since I don't know in advance which phones will give which values I don't know what to do about this. Any ideas?

    Has anyone else encountered this problem?

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    According to the specs it should be 1-12. If you are getting 0-11 it's a bug. What phones did you get that on?

    Also, you might have some errors in the code so if you post it that would help too.

    shmoove

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    6

    reply

    the same program when working on my Nokia 3100 gives 1..12 but gives 0..11 in the Sony Ericsson emulator. Also if you look at this webpage:

    http://javaalmanac.com/egs/java.util/GetCurTime.html

    it shows that some phones must use the 0..11 format even though the specs say it should be 1..12.

Posting Permissions

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