Skip to main content



      Home
Home » Archived » BIRT » Problems with getYear() on Date Values
Problems with getYear() on Date Values [message #88455] Mon, 07 November 2005 13:58 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:View birt report in CSV format
Next Topic:Problems understanding monthly groupings
Goto Forum:
  


Current Time: Sat Jul 12 07:40:00 EDT 2025

Powered by FUDForum. Page generated in 0.23864 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top