Re: 2 Questions (Date and Write)
Lasse Reichstein Nielsen wrote:
[color=blue]
> Randy Webb <hikksnotathome @aol.com> writes:
>
>[color=green]
>>Actually, they are both getting it wrong. getYear *should* return the
>>2 digit year, of which neither is doing that properly.[/color]
>
>
> If you follow the recommendation of ECMA262, getYear (which is not a
> required property of ECMAScript Date objects) should return the
> year - 1900:[/color]
I meant should in the respect of what it should do, instead of what it
does. To me, getYear should be a shortcut (maybe the wrong term) for
getFullYear().s ubstring(year.l ength-2,year.length). Meaning, if I want
2004 for this year, use getFullYear, if I only wanted 04, then getYear
would be a candidate for it. Maybe getPartialYear :)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Lasse Reichstein Nielsen wrote:
[color=blue]
> Randy Webb <hikksnotathome @aol.com> writes:
>
>[color=green]
>>Actually, they are both getting it wrong. getYear *should* return the
>>2 digit year, of which neither is doing that properly.[/color]
>
>
> If you follow the recommendation of ECMA262, getYear (which is not a
> required property of ECMAScript Date objects) should return the
> year - 1900:[/color]
I meant should in the respect of what it should do, instead of what it
does. To me, getYear should be a shortcut (maybe the wrong term) for
getFullYear().s ubstring(year.l ength-2,year.length). Meaning, if I want
2004 for this year, use getFullYear, if I only wanted 04, then getYear
would be a candidate for it. Maybe getPartialYear :)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Comment