# New Date(), getMonth() problem

**URL:** <https://forum.kirupa.com/t/new-date-getmonth-problem/258042>\
**Category:** Uncategorized\
**Created:** [April 20, 2008, 6:12am UTC](https://forum.kirupa.com/t/new-date-getmonth-problem/258042 "2008-04-20T06:12:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fw2803](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@fw2803](https://forum.kirupa.com/u/fw2803)\
**Post date:** [April 20, 2008, 6:12am UTC](https://forum.kirupa.com/t/new-date-getmonth-problem/258042/1 "2008-04-20T06:12:26Z")

</div>

Hi everyone

I’m working on the Graduation Dinner website of my school and I found something weird about the getMonth() function…

Consider the following codes:

```auto

var date = new Date()
var month = date.getMonth()
trace(month)

```

It’s April at the moment, right? But the output shows March (i.e. 3 instead of 4). So does the function getMonth() count January as 0 and so on? I’ve checked my computer’s clock and yes, my computer is showing April.

Any help is highly appreciated. Thank you.
