Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
Bug in Javascript Date object?
pawan chopra
Ranch Hand
Posts: 419
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I have tried running following code I code weird results:
<html> <body> <script type="text/javascript"> var d = new Date(); d.setMonth(1) document.write(d); </script> </body> </html>
I got
Tue Mar 03 2009 21:04:51 GMT+0530 (India Standard Time)
Is it a bug in Javascript or I am doing some thing bad??
Pawan Chopra
SCJP -
itspawan.com
Bear Bibeault
Sheriff
Posts: 67753
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
So what date is February 31? Think about it.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Eric Pascarello
author
Posts: 15385
6
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Months are zero based not one based.
Eric
Why is the word "abbreviation" so long? And this ad is so short?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Need help running Java as script (urgent)
passing formname and texboxname in a function as parameter
Date Problem in javascript.
Appending the data in frame or popup window
javascript calculating between 2 dates
More...