I would like to get the Unix epoch time , so I wrote :
<input id="vacancy_start" name="vacancy_start" onchange="alert( new
Date($('vacancy_start').value).dateFormat('U') );"
.....
but I get an error :
Error : (new Date($("vacancy_start").value)).format is not a function
what's wrong ?
thanks for your help
erwin
dateFormat is a Java function, not a JavaScript one.
<input id="vacancy_start" name="vacancy_start"
onchange="alert( new Date(this.value).getTime()/1000 );">
<http://www.esqsoft.com/javascript_examples/date-to-epoch.htm>
Google is your friend.
--
sm
merci, thanks .. je comprends mieux maintenant ...
tant mieux parce que, perso, les dates ça me reste bien compliqué.
Un espécialiste Me EsDates et EsCalendriers :
<http://www.merlyn.demon.co.uk/js-date0.htm>
<http://www.merlyn.demon.co.uk/js-dates.htm>
<http://www.merlyn.demon.co.uk/js-dates.htm#ODp>
--
sm
>tant mieux parce que, perso, les dates ça me reste bien compliqué.
>Un espécialiste Me EsDates et EsCalendriers :
>
><http://www.merlyn.demon.co.uk/js-date0.htm>
><http://www.merlyn.demon.co.uk/js-dates.htm>
><http://www.merlyn.demon.co.uk/js-dates.htm#ODp>
<g>
Ou /via/ <http://translate.google.com/translate?client=tmpg&hl=en&u=http
://www.merlyn.demon.co.uk/index.htm&langpair=en|fr>.
H'mm - La, Google me dit "Le Nouveau-Brunswick SetTime, getTime ..." ;
Google dit que le page Anglais dit "NB The setTime, getTime ..." et
actuellement le page Anglais dit "N.B. The setTime, getTime ..." et
j'ai ecrit "<p><b>N.B.</b> The <tt>setTime, getTime</tt> " !
Et N.B. en *Anglais*, c'est North Britain, point New Brunswick, qui est
seulement Canadien. North Britain est une euphemisme pour l'Ecosse.
It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE7 FF2 Op9 Sf3
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Alors l� ! ce n'est vraiment pas � recommander !
Autant tenter de lire en VO m�me si on fait qques contre sens.
> H'mm - La, Google me dit "Le Nouveau-Brunswick SetTime, getTime ..." ;
(...)
> Et N.B. en *Anglais*, c'est North Britain, point New Brunswick, qui est
> seulement Canadien. North Britain est une euphemisme pour l'Ecosse.
L'est nul ce Google, il ne connait que le nouveau monde!
--
sm