Results 1 to 5 of 5

Thread: About date display in Epoch calendar Help

  1. #1
    Join Date
    Mar 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default About date display in Epoch calendar Help

    Hi there,
    at the moment, I'm modifying/adding code on the Epoch calendar v.106 to use it on my website. And for that, I added a validating button that allows me to catch the date and put in in a form.

    I succeeded in catching the date, but, though I changed the name of days and monthes, and changed the date format also(on line 802 of the 'epoch_classes.js' file), the displayed date (in an 'alert()' window for the test) is under the following form :

    Thu Mar 20 2014 00:00:00 GMT+0100.

    And what I want is something like, in french,

    Jeudi 20 mars 2014, just that. Do you know how to do that ? Thanks,

    Djeros
    Last edited by Djeros; 03-27-2014 at 08:23 PM. Reason: fault

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    What you get in an alert() for a test might not be what you will see on the page when actually using the script.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

    Also, if you want French - you can download the French version (if you haven't already):

    http://www.epoch-calendar.com/javasc...wnload_fr.html
    - John
    ________________________

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

  3. #3
    Join Date
    Mar 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi jscheuer1,
    and thanks for your response. Actually, I've already transformed the calendar in a french one ^^. I'm going to catch the selected dates in the form i prepared for, and if the date format is still problematic after that, i'll do what you've said, i mean, send the part of the code i've modified. See you soon

  4. #4
    Join Date
    Mar 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,
    well, i finally finded out how to display the date in a french format by using toLocalDate(). But several points are still annoying me ; for example, when i have several dates selected, when i dispaly it with the following code :

    validSelected.onclick = function() { alert(this.owner.selectedDates.toLocaleString());};

    i tried to separate the results with a space using join(' ') just after toLocaleString(), but it doesn't work, what is surprising because, if i use split(), it properly works and adds commas after each word. Do you know what's happening. Thanks to all for your help,

    Djeros

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    The result of the toLocaleString() method is a string. A string cannot be joined, it can be split though. Then it becomes an array, which if alerted or displayed is automatically type converted to a string with commas as the default delimiters being shown as a part of that string.
    - John
    ________________________

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

Similar Threads

  1. Jason's Date Input Calendar - Need Help to Display Empty Date Fields?
    By Dorgs in forum Dynamic Drive scripts help
    Replies: 9
    Last Post: 06-07-2013, 02:08 PM
  2. 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
  3. PHP / MYSQL Epoch Date Between
    By gpigate in forum PHP
    Replies: 1
    Last Post: 03-12-2010, 12:47 AM
  4. Replies: 1
    Last Post: 11-04-2005, 04:08 PM

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
  •