Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Looking date converter javascript for my country date format

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

    Default

    Hm. I don't know how to do this. You could approximate it every year and update it as needed, but that still could be complicated.

    I would suggest searching for an existing script that uses the format you need, or at least something based on the lunar cycle so the math works out. (There are probably plenty of Islamic calendar scripts out there-- those are lunar I believe; would that work?)

    Good luck!
    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

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

    Default

    Ok, provide me!

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

    Default

    As I said, it will not be accurate in all cases without more detailed knowledge of how the Bikram Sambat months vary. I've searched for that online and haven't found anything more specific than that table I linked to. As a result I added this disclaimer:

    Disclaimer: This converter uses javascript only and may be inaccurate for certain dates.
    But I decided to go ahead and make the basic script anyway:

    http://home.comcast.net/~jscheuer1/s...ikram/demo.htm

    Use your browser's "View Source" to get the code. I found that the basic conversion (add or subtract 56 years, 8 months, 17 days) would not work exactly with the other math/code I wrote. The 56 years and 8 months seem fine. But for days I found that going from BS to AD required subtracting 15, not 17 days and that going from AD to BS required adding 16, not 17. This may in whole or in part be due to the number of leap years occurring in the intervening 56 years, 8 months. If so, these values may need to be adjusted depending upon that number of leap years. But for current, recent, and near dates, seems fine.
    - John
    ________________________

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

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

    Default Take look

    Hmm..
    This work fine...
    Thanks you too many. Many..
    Can u add Week result function too?
    Bro, Can my user submit their input in Input form not in a "option" method.
    E.g.: <input type="text" name="Year"...........etc"/>
    And can i show the result in "font type" not in option menu.
    E.g.: When User submit a Input form. It would be show as following:

    Your Result: "Year/Month/Day - Week of day"

    what must i do for make this. Eg.: change/modify in script, or what

    Bro, i will be much satisfy for this pls.

    Bro, i found that this Dynamic forum site is much useful and important for webmaster/webdeveloper.
    I mistakly found this site in Google search, and i thought i am so lucky for finding this awensome forum board.

    Bro You Can found more information about Bickram Sambat by online searching "Nepali Calander", "Nepali Date", "Nepali Miti" etc
    -Sorry for bad English
    Last edited by Debendra Oli; 11-25-2013 at 05:02 AM. Reason: Add info

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

    Default

    Please don't post so many duplicate/similar posts. If your post doesn't show up right away. Be patient. It can take up to 48 hours for a post to validate.

    The script can show the day of the week (Monday, Tuesday, etc.) if that's what you mean:

    http://home.comcast.net/~jscheuer1/s...kram/demo3.htm

    I have checked Google for all of those searches. I still haven't found anything that tells me how the length of a given Nepali month in a given Nepali year is decided. I'm guessing it has to do with the length of the lunar cycle. But it could be that and something else, or something else completely. Even if it is just the lunar cycle, I'm not sure in what way it relates, or how to take that into account using javascript alone.

    And I'm not sure I want to reinvent the wheel. An accurate converter is offered for free:

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

    Example:

    http://home.comcast.net/~jscheuer1/s...kram/demo2.htm

    I know you say you don't want an iframe. But the advantages of using an accurate converter that's already doing what you want seem to outweigh not wanting an iframe. What is wrong with an iframe anyway? They were once frowned upon, but the latest standard (HTML 5) now includes them as valid elements.
    Last edited by jscheuer1; 11-25-2013 at 03:59 PM. Reason: add info
    - John
    ________________________

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

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

    Default

    O!
    Your script is giving one 1 day forward in resulting the BS To AD.

    Can my user submit a result in input method, you have done in option method.

    Bro, which hosting you r using (free/paid).
    Bro, for direct contact to you can i have any social networking medias like facebook, twitter etc.....

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

    Default

    I told you it would be inaccurate for some dates.

    You can play with the code and inputs if you like.

    My web space is courtesy of my ISP, it's included in the service. It's very limited as far as features go, no PHP or asp, for example.
    I can think of no reason why we would need any more direct contact than we have here.
    - John
    ________________________

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

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

    Default

    Ok !
    Bro can i have any online video and mp3 player script for my site by url method?

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

    Default

    Please start a new thread for a new question.
    - John
    ________________________

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

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
  •