Problems with getYear() on Date Values [message #88455] |
Mon, 07 November 2005 13:58  |
Eclipse User |
|
|
|
Originally posted by: pcasey.earthlink.net
I have a date value:
set to about 7 PM on November 6th, 2005.
When I print out this date value inside of BIRT via row["incurred'], I
get:
2005-11-06 19:00:55.0
All well.
When I do a :
row["incurred'].getYear()
I'm getting back 105 instead of 2005!
My limited understanding of the javascript spec is that Date.getYear()
is supposed to return the 4 digit year, is it not? So is this a bug in the
BIRT javascript implementation, or am I doing something wrong?
--- Pat
|
|
|
Re: Problems with getYear() on Date Values [message #88835 is a reply to message #88455] |
Tue, 08 November 2005 13:53  |
Eclipse User |
|
|
|
According to my JavaScript book, getYear() subtracts 1900 from the year.
This is why you're getting 105.
"Patrick Casey" <pcasey@earthlink.net> wrote in message
news:dko83s$qdi$1@news.eclipse.org...
>
> I have a date value:
> set to about 7 PM on November 6th, 2005.
>
> When I print out this date value inside of BIRT via row["incurred'], I
> get:
>
> 2005-11-06 19:00:55.0
>
> All well.
>
> When I do a :
>
> row["incurred'].getYear()
>
> I'm getting back 105 instead of 2005!
>
> My limited understanding of the javascript spec is that Date.getYear()
> is supposed to return the 4 digit year, is it not? So is this a bug in the
> BIRT javascript implementation, or am I doing something wrong?
>
> --- Pat
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.23864 seconds