<html>
<head>
<script type="text/javascript">
function dayOfYear()
{
var firstJan = Math.floor((new Date().setFullYear(new Date().getFullYear(),0,1))/86400000);
var today = Math.ceil((new Date().getTime())/86400000);
return(today-firstJan);
}
</script>
</head>
<body>
<h1>Day of Year</h1>
Today is day <script type="text/javascript">document.write(dayOfYear());</script> of the year.
</body>
</html>
<head>
<script type="text/javascript">
function dayOfYear()
{
var firstJan = Math.floor((new Date().setFullYear(new Date().getFullYear(),0,1))/86400000);
var today = Math.ceil((new Date().getTime())/86400000);
return(today-firstJan);
}
</script>
</head>
<body>
<h1>Day of Year</h1>
Today is day <script type="text/javascript">document.write(dayOfYear());</script> of the year.
</body>
</html>
Today is day of the year.
No comments:
Post a Comment