2 Questions (Date and Write)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Randy Webb

    #16
    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/

    Comment

    • Bas Cost Budde

      #17
      Re: 2 Questions (Date and Write)

      Randy Webb wrote:
      [color=blue][color=green][color=darkred]
      >>>> As for issue 2. This can be done using the DOM: Document Object Model.[/color][/color][/color]
      [color=blue][color=green][color=darkred]
      >>> Technically, its done with Javascript. Javascript and the DOM are two
      >>> different things.[/color]
      >>
      >> Really? Wow! But Javascript is just a simpler form of Java, right?[/color]
      >
      > Just like cars are a simpler form of carpet.
      >[/color]
      can you have DOM in asphalt, concrete, dirt flavors then?

      --
      Bas Cost Budde

      but the domain is nl

      Comment

      Working...