Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18989
| From | Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: how to use MakeTime()? |
| Date | 2013-03-24 18:36 +0000 |
| Organization | Home |
| Message-ID | <C0SmmiE3e0TRFwlm@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <35b1cc53-fb63-46e9-8f4d-b9880c86fdc3@googlegroups.com> |
In comp.lang.javascript message <35b1cc53-fb63-46e9-8f4d-b9880c86fdc3@go oglegroups.com>, Thu, 21 Mar 2013 18:36:42, Jim Michaels <jmichae3@yahoo.com> posted: >I am trying to use MakeTIme(), MakeDay(), and MakeDate(). >for a time zone offset, I am using > var tztc = MakeTime(parseInt(tza[0]), parseInt(tza[1]), 0, 0);//GMT-8 or UTC-8 > var day = MakeDay(time.getUTCFullYear(), time.getUTCMonth() + 1, time.getUTCDate()); > var timeWithTZ = MakeTime(time.getUTCHours(), time.getUTCMinutes(), time.getUTCSeconds(), time.getUTCMilliseconds()) + tztc; > var tc = TimeClip( MakeDate(day, timeWithTZ) ); > var dt = new Date(tc); > >but this is causing the debugger error "MakeTime is not defined". I see this operator in older books. so it's very probable (?) that the >browser supports it, but if so, how? it's related to the Date object. >I tried > >var tztc = Date.MakeTime(parseInt(tza[0]), parseInt(tza[1]), 0, 0);//GMT-8 or UTC-8 > >and I tried >var d=new Date(); >var tztc = d.MakeTime(parseInt(tza[0]), parseInt(tza[1]), 0, 0);//GMT-8 or UTC-8 Those routines are specified by ECMA 262 for use "within" a Date Object, and are not specified to be exposed by an Object; therefore, they should not be exposed. AIUI, a Date Object is not actually required to use them, but is required to give the effect of using them internally. Once one realises that, it is easy to see in ECMA 262 which routines are to be "visible" Properties and which are for internal and/or explanatory use only. But the description of the internal routines should be sufficient to let you write your own versions; I suggest the use of similar but different names, such as JMmaketime for MakeTime. -- (c) John Stockton, nr London, UK. E-mail, see Home Page. Turnpike v6.05. Website <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
how to use MakeTime()? Jim Michaels <jmichae3@yahoo.com> - 2013-03-21 18:36 -0700
Re: how to use MakeTime()? Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-21 21:04 -0700
Re: how to use MakeTime()? Jim Michaels <jmichae3@yahoo.com> - 2013-03-22 00:21 -0700
Re: how to use MakeTime()? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-22 16:44 +0100
Re: how to use MakeTime()? Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-22 18:58 -0700
Re: how to use MakeTime()? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-22 16:30 +0100
Re: how to use MakeTime()? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-03-24 18:36 +0000
csiph-web