Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Looking date converter javascript for my country date format

  1. #1
    Join Date
    Nov 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Looking date converter javascript for my country date format

    Guys i am looking for a date converter java script for my country date format.
    Eg.: my country date is
    2070/08/07, when the gregoin date is 2013/11/22.
    And i wanna Gregoin to my country date converter and my country date to Gregoin date converter java script.
    If you can please help me. I will be really pleased to you.
    Best regards.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Here's a converter:

    http://www.ashesh.com.np/nepali-date-converter.php

    To write it from scratch we would need to know whether or not each day, month, and year corresponds exactly. If they do, simply adding or subtracting so many days will work. If not, the rules of how the two calendars differ would need to be known and used in the conversion.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default I wanna...

    I wanna date converter for my website even through i dont wanna using iframe. So i need javascript can u do it for me...
    Are u Nepali?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    I'm not Nepali, no.

    Most calendars are not exactly equal. The current Gregorian one has leap years and even leap seconds. Unless the Bikram sambat has the same ones, we can't just add or subtract an equal number of years, months, and days for each conversion. There is also the matter of the number of days in each month. Unless the Bikram sambat months that correspond to the Gregorian months also have the same number of days as those Gregorian months and begin and end on the same dates, determining the correct month and date number in that month would require taking those differences into account. There could be other differences. And depending upon how accurate you want to be, taking into account the time zone difference between the two geographical locations may need to be included.

    As I said before, we would need to know the rules that need to be used to convert one type of date to the other. Do you know anywhere that lists those rules?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Nov 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Oh!
    I am providing more diffrent information between nepalease date format and gregoien date format!
    We have the following month name.
    When gregoien month will be:
    January 1> Here is Poush 17
    Feb 1>Magh 17
    Mar 1>Falgun 17
    Apr 1>Chaitra 17
    May 1>Baisakh 17
    Jun 1>Jeth 17
    Jul 1>Asadh 17
    Aug 1>Srawan 17
    Oct 1>Bhadra 17
    Sep 1>Asawin 17
    Nov 1>Kartik 17
    Dec 1>Mansir 17
    when here is 17 gregoin will be 1.
    Years diffrent is 2070-2013
    Gregoin new year starts from Poush 17.
    my country timezone is +5:45

    First month is Baisakh, second is Baisakh, .....Jeth, Asadh, Swarn, Bhandra, Aswin, Kartik, Mansir, Poush, Magh, Falgun, Chaitra.
    Bro pls try for me if you do i will donate you some by heartly.
    Bro can i found u in a FB, TWITTER, ETC.
    U have website?

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    When gregoien month will be:
    January 1> Here is Poush 17
    Feb 1>Magh 17
    Mar 1>Falgun 17
    Apr 1>Chaitra 17
    May 1>Baisakh 17
    Jun 1>Jeth 17
    Jul 1>Asadh 17
    Aug 1>Srawan 17
    Oct 1>Bhadra 17
    Sep 1>Asawin 17
    Nov 1>Kartik 17
    Dec 1>Mansir 17
    when here is 17 gregoin will be 1.
    Years diffrent is 2070-2013
    Gregoin new year starts from Poush 17.
    my country timezone is +5:45
    Is this always true? Does it change from year to year? Is it the same in 2014? 2015? 1999?

    And what year is it now? 2013? When does the year end? Which month?
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Nov 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Oh you don't understand to me!
    Today My country date is 2070/08/09
    And gregoin is 2013/11/24
    I mean The diffrence between gregoin is that when my country goes 17 gregoin goes 1.

    17=1
    at last The gregoin and my country is "57 years 3 month 15 days difference.

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ok. Is that difference always constant?

    Are all of the months the same length? Are the years the same length?


    It is VERY easy to add 57y+3m+15d to a date. But that won't work unless it is consistent.

    For example, in the year 1900 was it still 57y+3m+15d? And in the year 2100, will it be 57y+3m+15d?
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,373
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Best I can tell, the Bikram sambat months vary in length from year to year or, probably more accurately stated - from lunar cycle to lunar cycle*. I believe PHP has built in ephemera that can be used to check that during conversion. And I think that's why all the converters I've seen online appear to be server based.

    In short, one could easily make a javascript converter that would add 56 Years, 8 Months, and 17 Days to the Gregorian to get the Bikram sambat and vice versa. But there would be many times when it would be off as far as which exact day of which exact month was correct.


    * See:

    http://calendars.wikia.com/wiki/Bikram_Samwat#Months

    for a table that shows each Nepali month as having variable length.
    Last edited by jscheuer1; 11-24-2013 at 04:22 AM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Nov 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Ya he is right!

    See a nepali calender 2011-12/2070:
    https://m.ak.fbcdn.net/sphotos-g.ak/...09278348_o.jpg
    and do the best.
    Pls guys!
    Can i found guys in social networking medias?

Similar Threads

  1. Display Date format in Jason's Date Input Calendar
    By axiom28 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 09-29-2011, 06:41 AM
  2. Date Format
    By QuizToon in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-23-2010, 08:01 PM
  3. date format
    By varshatest in forum PHP
    Replies: 4
    Last Post: 01-21-2007, 05:44 PM
  4. date format into uk
    By Skinnybobb in forum JavaScript
    Replies: 4
    Last Post: 04-25-2006, 11:45 AM

Bookmarks

Posting Permissions

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