Results 1 to 5 of 5
  1. #1
    elenora is offline Member
    Join Date
    Apr 2011
    Posts
    30
    Rep Power
    0

    Lightbulb question about method calendar.get(Calendar.DAY_OF_WEEK))

    Hi, Iwant to know how this method :calendar.get(Calendar.DAY_OF_WEEK))
    calculate day of week?I appreciate if anyone answer my question!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: question about method calendar.get(Calendar.DAY_OF_WEEK))

    Why don't you just check out the source?

    Why do you think you need to know this?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    elenora is offline Member
    Join Date
    Apr 2011
    Posts
    30
    Rep Power
    0

    Default Re: question about method calendar.get(Calendar.DAY_OF_WEEK))

    because the calendar in my country is diffrent with GMT calendar, for example in GMT today is 9/21/2011 but in my country today is 6/30/1390. and so in my country DAY_OF_WEEK is diffrent with GMT DAY_OF_WEEK! and I have searched in the Internet about it's source code but there isn't anything!!!!
    Last edited by elenora; 09-21-2011 at 04:15 PM.

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: question about method calendar.get(Calendar.DAY_OF_WEEK))

    What country/calendar is that, just out of curiosity?

    But the internals of Calendar take care of that stuff for you. If you really want to check it out, the source if freely available. But I think it basically has to do with different locales having different implementations of Calendar (such as GregorianCalendar, BuddhistCalendar, or JapaneseImperialCalendar), which handle things like days of the week and whatnot differently. Or even the same implementation of Calendar taking things like locale and timezone into account for you automatically. The beauty of the class is that you don't really have to worry about it.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: question about method calendar.get(Calendar.DAY_OF_WEEK))

    I was going to say that looks Islamic, but a quick Google showed that's a lunar calendar and should be around the 1430's.
    But I suspect it's related?

    Anyway, it is locale dependent. If your locale is included, and the local calendar is included, then you could be in luck. If not, then not.

Similar Threads

  1. Calendar Question
    By poller in forum Java Servlet
    Replies: 6
    Last Post: 11-10-2009, 02:31 AM
  2. How to add a calendar????
    By zifis in forum New To Java
    Replies: 5
    Last Post: 04-07-2009, 04:04 PM
  3. Calendar bug?
    By Stigvig in forum Advanced Java
    Replies: 14
    Last Post: 02-08-2009, 09:56 AM
  4. calendar
    By John in forum SWT / JFace
    Replies: 12
    Last Post: 08-07-2008, 10:54 PM
  5. Web calendar
    By Daniel in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 06-27-2007, 05: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
  •