»
AnglaisFrançaisVietnamien

Imprimer - Time Stamp Converter - JavaScriptBank.com

Version complète: jsB@nk » Heure » Validation » Time Stamp Converter
URL: https://www.javascriptbank.com/time-converter-script.html

Time Stamp Converter © JavaScriptBank.comTrouver le moment où un message e-mail a été envoyé est un peu délicate. Cela est particulièrement vrai si vous utilisez le Web. Sauvegardez et démarrez le fichier ci-joint Time.html. Il convertit la date et l'heure à l'heure locale.

Version complète: jsB@nk » Heure » Validation » Time Stamp Converter
URL: https://www.javascriptbank.com/time-converter-script.html



JavaScript
<SCRIPT language=javascript>// authir: Swapnil Guptafunction conv(){if( new Date( Date.parse(dstr.value) ).toLocaleString() == "NaN" )lstr.value = "Improper input.";elselstr.value = new Date( Date.parse(dstr.value) ).toLocaleString();}function rst(){dstr.value = lstr.value = "";}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=dstr.focus()><P>Paste date string: <INPUT type=txt size=40 name=dstr> <INPUT onclick=conv() type=button value=Convert></P><P>Local date string: <INPUT type=txt size=40 name=lstr> <INPUT onclick=rst() type=button value=Reset></P><P>Your comments and suggestions are welcome at <A href="mailto:Swapnil%20<geekboy@sify.com>">mailto:Swapnil%20&lt;geekboy@sify.com&gt;</A>.</P><H3>Instructions</H3><P>Copy the line after the Date: field of an e-mail message and paste it in the first box. Click the Convert button. The converted time will appear in the second box. For example, this is the header of a typical e-mail message:</P><PRE>Date: Monday, 1 May 2006 10:36:54 -0700 (PDT)From: Will Smith &lt;will_smith@yahoo.com&gt;To: Sandra Bullock &lt;sandra.bullock@hotmail.com&gt;Subject: Important message</PRE><P>Copy the first line after the Date: field, i.e.</P><PRE>Monday, 1 May 2006 10:36:54 -0700 (PDT)</PRE><P>and paste it in the first box. Click the convert button to convert the date string to local time.</P><BLOCKQUOTE><B>Note:</B> Make sure that the time-zone of your computer is set correctly.</BLOCKQUOTE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->