Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #24210

Re: Date.prototype.setTime

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Date.prototype.setTime
Date 2014-05-18 00:34 +0200
Organization PointedEars Software (PES)
Message-ID <3317286.bs45y0lo2E@PointedEars.de> (permalink)
References <Date.prototype.setTime-20140517224642@ram.dialup.fu-berlin.de>

Show all headers | View raw


Stefan Ram wrote:

>   I have observed that I can have the following statements executed:
> 
> Date.prototype.setTime( 0 ); document.write( Date.prototype.getTime() );
> Date.prototype.setTime( 1 ); document.write( Date.prototype.getTime() );
> 
>   prints:
> 
> 01
> 
>   . So I can set and get some kind of property.

Yes, the [[PrimitiveValue]] internal property, according to ES 5.1.
 
>   Where is this property stored?

In the Date instance which is referred to by the initial value of the 
“Date.prototype” property; see ES 5.1, §§ 15.9.5.27, 15.9.4.1, and 15.9.5.

>   Is it used for anything?

Not to my knowledge.

I wonder, why would you investigate the more obscure features of these 
languages before having mastered their basic ones?

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Date.prototype.setTime Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-05-18 00:34 +0200
  Re: Date.prototype.setTime "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-05-18 08:37 +0200

csiph-web