# Problem with "getYear" function, need some help

**URL:** https://forum.kirupa.com/t/problem-with-getyear-function-need-some-help/77413
**Category:** Uncategorized
**Created:** [January 27, 2005, 2:31am UTC](https://forum.kirupa.com/t/problem-with-getyear-function-need-some-help/77413 "2005-01-27T02:31:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Azazel](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Azazel](https://forum.kirupa.com/u/Azazel)
#### Post date: [January 27, 2005, 2:31am UTC](https://forum.kirupa.com/t/problem-with-getyear-function-need-some-help/77413/1 "2005-01-27T02:31:10Z")

</div>

K, dont think that this should be to hard for some of u gurus to figure out… me… i’m just a novice flasher, so i can’t see what the prob is :cantlook:

[here is the as]

onClipEvent (load){  
mon = [" .01"," .02"," .03"," .04"," .05"," .06"," .07"," .08"," .09"," .10"," .11"," .12"];  
weekdays = [".Sunday",".Monday",".Tuesday",".Wednesday",".Thursday",".Friday",".Saturday"];  
}  
onClipEvent (enterFrame){  
now = new Date()  
nDay = weekdays[now.getDay()]  
nMonth = mon[now.getMonth()]  
nDate = now.getDate()  
nYear = now.getYear()  
display =nDay+""+nDate+""+nMonth+"."+nYear  
}

and here is the problem… the “now.getYear()” gives “105”, but i want i to give only two digits i.e “05”.

Anybody know why?? :hugegrin:
