Convert Date to Hindu Calendar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KalariaNitya
    New Member
    • Apr 2008
    • 34

    Convert Date to Hindu Calendar

    Hello All,

    I want to convert Date to Hindu Calender. For e.g. today is 12th sep'2008 so convert it to bhadarvo sud baras.

    can anybody help me how to do that?

    thanking u in advanced..
  • KalariaNitya
    New Member
    • Apr 2008
    • 34

    #2
    Convert Date to Hindu Calender

    Hello All,

    I want to convert Date to Hindu Calender. For e.g. today is 12th sep'2008 so convert it to bhadarvo sud baras.

    can anybody help me how to do that?

    thanking u in advanced..

    Comment

    • Nepomuk
      Recognized Expert Specialist
      • Aug 2007
      • 3111

      #3
      Originally posted by KalariaNitya
      can anybody help me how to do that?
      Without knowing which language you're using, no we can't. Also, have you done anything yet? If so, please show us, what you've done. Or are you asking for the correct classes / libraries / methods to use?

      Greetings,
      Nepomuk

      Comment

      • cloud255
        Recognized Expert Contributor
        • Jun 2008
        • 427

        #4
        Hi there,

        Not everyone at this forum knows or understands the way in which calendars of different cultures work. If you could explain the relationship between the standard Gregorian Calendar date (which is 12 September today) and the Hindu calender, we could try to create some algorithm to help you...

        Comment

        • KalariaNitya
          New Member
          • Apr 2008
          • 34

          #5
          thanks to reply me.

          right now i am doing r&d on it..

          if you have any idea then may i know that which libraries we can use?

          i am using asp.net.

          thanking u in advanced..

          Originally posted by Nepomuk
          Without knowing which language you're using, no we can't. Also, have you done anything yet? If so, please show us, what you've done. Or are you asking for the correct classes / libraries / methods to use?

          Greetings,
          Nepomuk

          Comment

          • KalariaNitya
            New Member
            • Apr 2008
            • 34

            #6
            thanks to reply me..

            for example today's date is 12th sep'2008. and according to Vikram samvat
            today is Bhadrapada Suklapaksha Dvadasï(Baras)

            one reference link for it is: http://hindunet.org/hindu_calendar/

            i have one confusion that if according to Vikram samvat any thithi is missing then how can we calculate correct tithi for next dates..

            could u please help me?

            thanking u in advanced.



            Originally posted by cloud255
            Hi there,

            Not everyone at this forum knows or understands the way in which calendars of different cultures work. If you could explain the relationship between the standard Gregorian Calendar date (which is 12 September today) and the Hindu calender, we could try to create some algorithm to help you...

            Comment

            • cloud255
              Recognized Expert Contributor
              • Jun 2008
              • 427

              #7
              Originally posted by KalariaNitya
              for example today's date is 12th sep'2008. and according to Vikram samvat
              today is Bhadrapada Suklapaksha Dvadasï(Baras)

              one reference link for it is: http://hindunet.org/hindu_calendar/
              If i understand that site correctly, the calendar has 12 months with 364 days... This is a bit of a problem as every year you loose 1-2 days on the Gregorian year.

              One solution i suppose is to look at the DateTime class and perform some calculations to get the month. This thing of the Lunar days i dont understand, how does it work if there are only 15 lunar days but a 30/31 day month? Do days repeat?

              If they do, you then need to use the systems date time from some point for which you know the date, then work from that point, i would look for a date where both new years are on the same day and always calculate time lapse as a division of 364 to the number of days since the reference date. This way you could find the month and day of the month by looking int the remainder from the division. You need to note that for four months the division of the remainder must be 31 for the rest by 30 to get to the month and then this remainder will provide you with the day in that month. A modulus function will prove quite handy.

              as far as the days of the week are concerned: This is just a simple switch on the DateTime.Now.Da yOfWeek value.

              Comment

              • Nepomuk
                Recognized Expert Specialist
                • Aug 2007
                • 3111

                #8
                Originally posted by KalariaNitya
                thanks to reply me.

                right now i am doing r&d on it..

                if you have any idea then may i know that which libraries we can use?

                i am using asp.net.

                thanking u in advanced..
                Well, I don't know any ASP.NET, but I'll have this thread moved to the .NET Forum, where the experts will surely help you.

                Greetings,
                Nepomuk

                Comment

                • Stang02GT
                  Recognized Expert Top Contributor
                  • Jun 2007
                  • 1206

                  #9
                  Moved to ASP.NET fourm

                  Comment

                  • DrBunchman
                    Recognized Expert Contributor
                    • Jan 2008
                    • 979

                    #10
                    Nope that was the ASP Forum..I've moved it on to .NET :-)

                    Dr B

                    Comment

                    • KalariaNitya
                      New Member
                      • Apr 2008
                      • 34

                      #11
                      Ok..do u have any idea how to do that?
                      Originally posted by DrBunchman
                      Nope that was the ASP Forum..I've moved it on to .NET :-)

                      Dr B

                      Comment

                      • Frinavale
                        Recognized Expert Expert
                        • Oct 2006
                        • 9749

                        #12
                        You are going to have to create your own date conversion algorithm to solve your problem. This is not provided to you automatically by .NET.

                        Your problem is not so much an implementation question as it is a question on understanding how the Hindu Calender relates to the Gregorian calendar.

                        See post #7.
                        Cloud255 has made a great suggestion on where to start while creating this conversion algorithm.

                        The experts on this forum are here to help you with any technical difficulties you experience with coding (implementing) your application. We do not have the expertise to help you understand the Hindu Calender and how it converts to the Gregorian calendar. Please research this topic and have a full grasp of your business logic required to do this conversion before attempting to code anything. Once you begin your implementation, feel free to ask us any questions that you have with concerns to the technicalities of coding; but do not assume that the experts here have any knowledge on how the Hindu Calendar works.


                        -Moderator Frinny

                        Comment

                        • KalariaNitya
                          New Member
                          • Apr 2008
                          • 34

                          #13
                          there is no any algorithm for this..
                          we have to develop it by riligious calender..
                          thanks for all ur supports..

                          it has been recently done..

                          thanks

                          Originally posted by Frinavale
                          You are going to have to create your own date conversion algorithm to solve your problem. This is not provided to you automatically by .NET.

                          Your problem is not so much an implementation question as it is a question on understanding how the Hindu Calender relates to the Gregorian calendar.

                          See post #7.
                          Cloud255 has made a great suggestion on where to start while creating this conversion algorithm.

                          The experts on this forum are here to help you with any technical difficulties you experience with coding (implementing) your application. We do not have the expertise to help you understand the Hindu Calender and how it converts to the Gregorian calendar. Please research this topic and have a full grasp of your business logic required to do this conversion before attempting to code anything. Once you begin your implementation, feel free to ask us any questions that you have with concerns to the technicalities of coding; but do not assume that the experts here have any knowledge on how the Hindu Calendar works.


                          -Moderator Frinny

                          Comment

                          • joedeene
                            Contributor
                            • Jul 2008
                            • 579

                            #14
                            Did you accomplish what you were attempting? If not, then i'd recommend using a database and getting the standard date(gregorian, i believe), and looking in the database to translate it, but you'd have to set your database to have all the hindu dates...

                            joedeene

                            Comment

                            • Shashi Devani

                              #15
                              There appears to be no straight formula that I know for converting from Gregorain (or Christian dates) to Hindu Calender because Hindu Calender is based on the Lunar month of 2 periods of 15 days: new Moon to Full Moon and Full Moon to New Moon. That is 360 days ina years. Instead of a day added every 4 years for the quarter extra day in the 365 day Solar Year, Hindu Calender adds a whole month to rectify the discrepancy. Also as the moon rises and sets at different times of the Solar day, two consecutive religious days fall with a "gap" between the two Solar days. I know the Hindu birthdays of my grandparents and am looking for a way to verify the correct Christian date for the record but have been unable to get them!

                              Comment

                              Working...