leonidassavvides
10-27-2008, 09:31 AM
exist any javascript function checks a date if is correct
eg a wrong date= 31 feb 2009, returns false ?
To show local time(NOW) GMT+2 to each visitor indepented where he is[time zone] I must use server time zone or exist and js function gives GMT TIME and after I add two hours to this ?
this is corect
var today2gmt = Date.UTC()+2*60*60;
// ms today GMT+2 TIME ANYWHERE
This builds an object: today2gmt = Date.UTC()+2*60*60 or not I must use
gmt2 - new Date(today2gmt); // this is corect ?
To asign to a day/month/year html form fields (date) the current date I must use if FormName="book" and day/month/year field names are "day","month","year" and I have a date object "gmt2"
document.book.day.value = gmt2.getDay();
document.book.month.value = months[gmt2.getMonth()]
document.book.year.value = gmt2.getFullYear();
when I must call these statements , when page loads at head section ?
eg a wrong date= 31 feb 2009, returns false ?
To show local time(NOW) GMT+2 to each visitor indepented where he is[time zone] I must use server time zone or exist and js function gives GMT TIME and after I add two hours to this ?
this is corect
var today2gmt = Date.UTC()+2*60*60;
// ms today GMT+2 TIME ANYWHERE
This builds an object: today2gmt = Date.UTC()+2*60*60 or not I must use
gmt2 - new Date(today2gmt); // this is corect ?
To asign to a day/month/year html form fields (date) the current date I must use if FormName="book" and day/month/year field names are "day","month","year" and I have a date object "gmt2"
document.book.day.value = gmt2.getDay();
document.book.month.value = months[gmt2.getMonth()]
document.book.year.value = gmt2.getFullYear();
when I must call these statements , when page loads at head section ?