# Is this code written wrong?

**URL:** <https://forum.kirupa.com/t/is-this-code-written-wrong/249484>\
**Category:** flash\
**Created:** [January 19, 2008, 5:27am UTC](https://forum.kirupa.com/t/is-this-code-written-wrong/249484 "2008-01-19T05:27:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tivaelydoc](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@tivaelydoc](https://forum.kirupa.com/u/tivaelydoc)\
**Post date:** [January 19, 2008, 5:27am UTC](https://forum.kirupa.com/t/is-this-code-written-wrong/249484/1 "2008-01-19T05:27:07Z")

</div>

onClipEvent (enterFrame)  
{  
var time = new Date();  
var month = time.getMonth()+1;  
var day = time.getDate();  
var hours = time.getHours();  
var minutes = time.getMinutes();  
var seconds = time.getSeconds();  
var milliseconds = time.getMilliseconds();  
this.hour.\_rotation = 30 \* hours + minutes / 2;  
this.min.\_rotation = 6 \* minutes;  
this.sec.\_rotation= 6 \* seconds;  
this.mil.\_rotation= .36 \* milliseconds;  
this.month.\_rotation= 30 \* month;  
this.day.\_rotation= 360/31 \* date;  
}

For some reason, all the hands work except the month and the day. How come?
