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


Groups > comp.lang.javascript > #16157 > unrolled thread

How to construct a tomorrow?

Started byjustaguy <lichunshen84@gmail.com>
First post2012-09-26 14:47 -0700
Last post2012-09-30 13:49 +0200
Articles 20 on this page of 25 — 9 participants

Back to article view | Back to comp.lang.javascript


Contents

  How to construct a tomorrow? justaguy <lichunshen84@gmail.com> - 2012-09-26 14:47 -0700
    Re: How to construct a tomorrow? Christoph Becker <cmbecker69@gmx.de> - 2012-09-27 00:58 +0200
      Re: How to construct a tomorrow? justaguy <lichunshen84@gmail.com> - 2012-09-26 17:47 -0700
        Re: How to construct a tomorrow? Gene Wirchenko <genew@ocis.net> - 2012-09-26 19:53 -0700
          Re: How to construct a tomorrow? Dr J R Stockton <reply1239@merlyn.demon.co.uk.invalid> - 2012-09-28 18:40 +0100
            Re: How to construct a tomorrow? Gene Wirchenko <genew@ocis.net> - 2012-09-29 20:52 -0700
      Re: How to construct a tomorrow? Dr J R Stockton <reply1239@merlyn.demon.co.uk.invalid> - 2012-09-28 18:30 +0100
        Re: How to construct a tomorrow? Christoph Becker <cmbecker69@gmx.de> - 2012-09-29 02:00 +0200
          Re: How to construct a tomorrow? John G Harris <john@nospam.demon.co.uk> - 2012-09-29 10:02 +0100
          Re: How to construct a tomorrow? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-09-30 14:29 +0200
            Re: How to construct a tomorrow? Christoph Becker <cmbecker69@gmx.de> - 2012-09-30 23:24 +0200
          Re: How to construct a tomorrow? Dr J R Stockton <reply1239@merlyn.demon.co.uk.invalid> - 2012-09-30 19:55 +0100
    Re: How to construct a tomorrow? Dr J R Stockton <reply1239@merlyn.demon.co.uk.invalid> - 2012-09-27 21:32 +0100
      Re: How to construct a tomorrow? Christoph Becker <cmbecker69@gmx.de> - 2012-09-28 01:03 +0200
        Re: How to construct a tomorrow? Gene Wirchenko <genew@ocis.net> - 2012-09-27 16:36 -0700
        Re: How to construct a tomorrow? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-09-28 10:37 +0200
        Re: How to construct a tomorrow? Dr J R Stockton <reply1239@merlyn.demon.co.uk.invalid> - 2012-09-29 20:39 +0100
          Re: How to construct a tomorrow? Christoph Becker <cmbecker69@gmx.de> - 2012-09-30 23:37 +0200
      Re: How to construct a tomorrow? Andrew Poulos <ap_prog@hotmail.com> - 2012-09-28 09:25 +1000
      Re: How to construct a tomorrow? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-09-28 08:37 -0700
        Re: How to construct a tomorrow? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-09-28 18:48 +0200
        Re: How to construct a tomorrow? Dr J R Stockton <reply1239@merlyn.demon.co.uk.invalid> - 2012-09-29 20:40 +0100
          Re: How to construct a tomorrow? Andrew Poulos <ap_prog@hotmail.com> - 2012-09-30 18:32 +1000
      Re: How to construct a tomorrow? Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-09-28 23:57 +0200
        Re: How to construct a tomorrow? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-09-30 13:49 +0200

Page 1 of 2  [1] 2  Next page →


#16157 — How to construct a tomorrow?

Fromjustaguy <lichunshen84@gmail.com>
Date2012-09-26 14:47 -0700
SubjectHow to construct a tomorrow?
Message-ID<6aae09ab-0d45-4c30-accf-909d7445c6a2@o8g2000yqm.googlegroups.com>
var today = new Date();
	today = today.toDateString();
	// alert(today);
       // all good

how do we get tomorrow based on today?
var tomorrow = today + 1
// definitely won't work
// and javascript does not something like dateAdd function or method
// googling get some long worded code to get a little thing done, your
thoughts?

Thanks.

[toc] | [next] | [standalone]


#16158

FromChristoph Becker <cmbecker69@gmx.de>
Date2012-09-27 00:58 +0200
Message-ID<k401aj$jnh$1@speranza.aioe.org>
In reply to#16157
justaguy wrote:
> how do we get tomorrow based on today?

That's all explained on
<https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date>:

| The JavaScript date is measured in milliseconds since midnight
| 01 January, 1970 UTC. A day holds 86,400,000 milliseconds.

| getTime
|   Returns the numeric value of the specified date as the number of  |
  milliseconds since January 1, 1970, 00:00:00 UTC (negative for
|   prior times).

So a simple solution is:

var today = new Date();
var tomorrow = new Date(today.getTime() + 86400000)

For further details on date calculations have a look at the parameters
of the constructor function and the get*() methods of Date.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#16162

Fromjustaguy <lichunshen84@gmail.com>
Date2012-09-26 17:47 -0700
Message-ID<e25d18ca-25a1-43c7-ae02-b3ad24eefbc2@u19g2000yqo.googlegroups.com>
In reply to#16158
On Sep 26, 6:58 pm, Christoph Becker <cmbecke...@gmx.de> wrote:
> justaguy wrote:
> > how do we get tomorrow based on today?
>
> That's all explained on
> <https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_...>:
>
> | The JavaScript date is measured in milliseconds since midnight
> | 01 January, 1970 UTC. A day holds 86,400,000 milliseconds.
>
> | getTime
> |   Returns the numeric value of the specified date as the number of  |
>   milliseconds since January 1, 1970, 00:00:00 UTC (negative for
> |   prior times).
>
> So a simple solution is:
>
> var today = new Date();
> var tomorrow = new Date(today.getTime() + 86400000)
>
> For further details on date calculations have a look at the parameters
> of the constructor function and the get*() methods of Date.
>
> --
> Christoph M. Becker

Beautiful, thank you,  With the same token, we can set a variable for
the day after tomorrow as well, I tested it and it works.

[toc] | [prev] | [next] | [standalone]


#16171

FromGene Wirchenko <genew@ocis.net>
Date2012-09-26 19:53 -0700
Message-ID<djf7689j7ruhk20bn8lqsujhr8de3qk06l@4ax.com>
In reply to#16162
On Wed, 26 Sep 2012 17:47:49 -0700 (PDT), justaguy
<lichunshen84@gmail.com> wrote:

>On Sep 26, 6:58 pm, Christoph Becker <cmbecke...@gmx.de> wrote:
>> justaguy wrote:
>> > how do we get tomorrow based on today?
>>
>> That's all explained on
>> <https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_...>:
>>
>> | The JavaScript date is measured in milliseconds since midnight
>> | 01 January, 1970 UTC. A day holds 86,400,000 milliseconds.
>>
>> | getTime
>> |   Returns the numeric value of the specified date as the number of  |
>>   milliseconds since January 1, 1970, 00:00:00 UTC (negative for
>> |   prior times).
>>
>> So a simple solution is:
>>
>> var today = new Date();
>> var tomorrow = new Date(today.getTime() + 86400000)

     Or
var Tomorrow=new Date();
Tomorrow.setDate(Tomorrow.getDate()+1);

     Yes, this works even at the end of a month.

>> For further details on date calculations have a look at the parameters
>> of the constructor function and the get*() methods of Date.

     And watch it!  1) Date's .getDay() does not get the day of the
month.  2) Date's month values are off by 1.  3) Date's .getYear()
does not get the year.  4) I would not be surprised if there were a
fourth item.  Truly, the Date object could have been defined better.

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#16236

FromDr J R Stockton <reply1239@merlyn.demon.co.uk.invalid>
Date2012-09-28 18:40 +0100
Message-ID<JfudeZOkEeZQFwT7@invalid.uk.co.demon.merlyn.invalid>
In reply to#16171
In comp.lang.javascript message <djf7689j7ruhk20bn8lqsujhr8de3qk06l@4ax.
com>, Wed, 26 Sep 2012 19:53:40, Gene Wirchenko <genew@ocis.net> posted:

>
>     And watch it!  1) Date's .getDay() does not get the day of the
>month.  2) Date's month values are off by 1.  3) Date's .getYear()
>does not get the year.  4) I would not be surprised if there were a
>fourth item.  Truly, the Date object could have been defined better.

I blame all of that on Canada, for not enlightening their southern
neighbours previously.

For a better but compatible Date Object, see
<http://www.merlyn.demon.co.uk/js-dobj2.htm>.

For a really bad implementation, see Safari 5 for Windows (Mac? etc.?),
part of which does not correctly interpret /Inter Gravissimas/ - test in
<http://www.merlyn.demon.co.uk/js-datex.htm>.

-- 
 (c) John Stockton, nr London, UK.    ?@merlyn.demon.co.uk     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.

[toc] | [prev] | [next] | [standalone]


#16263

FromGene Wirchenko <genew@ocis.net>
Date2012-09-29 20:52 -0700
Message-ID<6bgf68d7totg922iifuk5ctd958sotnt6h@4ax.com>
In reply to#16236
On Fri, 28 Sep 2012 18:40:52 +0100, Dr J R Stockton
<reply1239@merlyn.demon.co.uk.invalid> wrote:

>In comp.lang.javascript message <djf7689j7ruhk20bn8lqsujhr8de3qk06l@4ax.
>com>, Wed, 26 Sep 2012 19:53:40, Gene Wirchenko <genew@ocis.net> posted:
>
>>
>>     And watch it!  1) Date's .getDay() does not get the day of the
>>month.  2) Date's month values are off by 1.  3) Date's .getYear()
>>does not get the year.  4) I would not be surprised if there were a
>>fourth item.  Truly, the Date object could have been defined better.
>
>I blame all of that on Canada, for not enlightening their southern
>neighbours previously.

     As a Canadian, I decline the blame.

>For a better but compatible Date Object, see
><http://www.merlyn.demon.co.uk/js-dobj2.htm>.

     It is too late for me.  I already have made Date work for me,
sort of.

>For a really bad implementation, see Safari 5 for Windows (Mac? etc.?),
>part of which does not correctly interpret /Inter Gravissimas/ - test in
><http://www.merlyn.demon.co.uk/js-datex.htm>.

     You should have saved this for another month or so.  Hallowe'en
would be a more appropriate time for this sort of thing.  <BEG>

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#16235

FromDr J R Stockton <reply1239@merlyn.demon.co.uk.invalid>
Date2012-09-28 18:30 +0100
Message-ID<ecUo+7MM7dZQFwAQ@invalid.uk.co.demon.merlyn.invalid>
In reply to#16158
In comp.lang.javascript message <k401aj$jnh$1@speranza.aioe.org>, Thu,
27 Sep 2012 00:58:35, Christoph Becker <cmbecker69@gmx.de> posted:

>justaguy wrote:
>> how do we get tomorrow based on today?

>So a simple solution is:
      xxxxxx naive
>
>var today = new Date();
>var tomorrow = new Date(today.getTime() + 86400000)

And what happens when the interval crosses 01:00 UTC on the last Sundays
of March and October? (dates and times are different for chronologically
inconvenient locations).

Also, 86400000 is better written as 864e5 - shorter, and avoids
miscounting zeroes.

-- 
 (c) John Stockton, nr London, UK.    ?@merlyn.demon.co.uk     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.

[toc] | [prev] | [next] | [standalone]


#16238

FromChristoph Becker <cmbecker69@gmx.de>
Date2012-09-29 02:00 +0200
Message-ID<k45dmn$8j7$1@speranza.aioe.org>
In reply to#16235
Dr J R Stockton wrote:
> In comp.lang.javascript message <k401aj$jnh$1@speranza.aioe.org>, Thu,
> 27 Sep 2012 00:58:35, Christoph Becker <cmbecker69@gmx.de> posted:
> 
>> justaguy wrote:
>>> how do we get tomorrow based on today?
> 
>> So a simple solution is:
>       xxxxxx naive
>>
>> var today = new Date();
>> var tomorrow = new Date(today.getTime() + 86400000)
> 
> And what happens when the interval crosses 01:00 UTC on the last Sundays
> of March and October? (dates and times are different for chronologically
> inconvenient locations).

I *thought* a day is defined as having 86,400 seconds (cf.
<http://www.bipm.org/en/si/si_brochure/chapter4/table6.html>).  If I am
mistaken in this view, please correct me -- I'll appreciate an
explanation or a link to one.

If you were referring to summer time issues, AFAIK this wouldn't be
relevant here, as the calculation is "internal", and the results
/should/ be faithfully presented in human readable form by calling
toLocalDateString().
> 
> Also, 86400000 is better written as 864e5 - shorter, and avoids
> miscounting zeroes.
> 
One might argue, that it's even better to write it as

24 * 60 * 60 * 1000

what is not as efficient and short, but indicates the meaning even more
clearly.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#16244

FromJohn G Harris <john@nospam.demon.co.uk>
Date2012-09-29 10:02 +0100
Message-ID<BRaWKxD4krZQFwDQ@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD>
In reply to#16238
On Sat, 29 Sep 2012 at 02:00:31, in comp.lang.javascript, Christoph
Becker wrote:
>Dr J R Stockton wrote:

  <snip>
>I *thought* a day is defined as having 86,400 seconds (cf.
><http://www.bipm.org/en/si/si_brochure/chapter4/table6.html>).  If I am
>mistaken in this view, please correct me -- I'll appreciate an
>explanation or a link to one.

The BIPM are ignoring leap seconds which make their definition of days
drift out of sync with UTC within a year or so.

Luckily, ECMAScript also knows nothing of leap seconds.


>If you were referring to summer time issues, AFAIK this wouldn't be
>relevant here, as the calculation is "internal", and the results
>/should/ be faithfully presented in human readable form by calling
>toLocalDateString().

Are you sure? It's safer to use setDate with the time set initially to
12 noon.


>> Also, 86400000 is better written as 864e5 - shorter, and avoids
>> miscounting zeroes.
>>
>One might argue, that it's even better to write it as
>
>24 * 60 * 60 * 1000
>
>what is not as efficient and short, but indicates the meaning even more
>clearly.

True, but Stockton has disliked it in the past. He doesn't go for clear.

  John
-- 
John Harris

[toc] | [prev] | [next] | [standalone]


#16270

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-09-30 14:29 +0200
Message-ID<3208870.M5aPXhl1hL@PointedEars.de>
In reply to#16238
Christoph Becker wrote:

> Dr J R Stockton wrote:
>> […] Christoph Becker <cmbecker69@gmx.de> posted:
>>> justaguy wrote:
>>>> how do we get tomorrow based on today?
>>> 
>>> So a simple solution is:
>>       xxxxxx naive
>>>
>>> var today = new Date();
>>> var tomorrow = new Date(today.getTime() + 86400000)
>> 
>> And what happens when the interval crosses 01:00 UTC on the last Sundays
>> of March and October? (dates and times are different for chronologically
>> inconvenient locations).
> 
> I *thought* a day is defined as having 86,400 seconds (cf.
> <http://www.bipm.org/en/si/si_brochure/chapter4/table6.html>).  If I am
> mistaken in this view, please correct me -- I'll appreciate an
> explanation or a link to one.

There are more definitions of "day" than that.  You can start by reading the 
corresponding Wikipedia article.

Even in standard time a day can have more or less seconds.  For example, UTC 
includes the concept of the leap second.  (The Date object does not include 
that concept, though.)
 
> If you were referring to summer time issues,

He was.

> AFAIK this wouldn't be relevant here, as the calculation is "internal",

It would be relevant.

> and the results /should/ be faithfully presented in human readable form by
> calling toLocalDateString().

The method is named `toLocal*e*DateString'; it refers to the system 
*locale*, _not_ necessarily local time.  It is specified in ECMAScript 
Ed. 3, and fully supported since JScript 5.5.6330, JavaScript 1.5, V8 
3.7.12.12, JSC 531.22.7, Opera 7.02, and KJS 4.6.5.  Insofar it can be 
considered safe for use.

Your assumption can be easily tested (in "Mozilla/5.0 (X11; Linux i686) 
AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"):

| > var today = new Date(2012, 9, 28);
|   var tomorrow = new Date(today.getTime() + 864e5);
|   console.log(today + "\n" + tomorrow);
| Sun Oct 28 2012 00:00:00 GMT+0200 (CEST)
| Sun Oct 28 2012 23:00:00 GMT+0100 (CET)
| 
| > console.log(today.toLocaleDateString() + "\n"
|     + tomorrow.toLocaleDateString());
| Sunday, October 28, 2012
| Sunday, October 28, 2012

So this approach evidently does not work.  But the question was how to 
construct a Date instance holding (a date of) tomorrow instead:

| > var tomorrow = new Date(2012, 9, 28);
| undefined
| 
| > tomorrow
| Sun Oct 28 2012 00:00:00 GMT+0200 (CEST)
| 
| > tomorrow.setDate(tomorrow.getDate() + 1);
| 1351465200000
| 
| > tomorrow
| Mon Oct 29 2012 00:00:00 GMT+0100 (CET)

>> Also, 86400000 is better written as 864e5 - shorter, and avoids
>> miscounting zeroes.
> 
> One might argue, that it's even better to write it as
> 
> 24 * 60 * 60 * 1000
> 
> what is not as efficient and short, but indicates the meaning even more
> clearly.

And it also shows why that number fails to accomplish "[getting] tomorrow 
based on today".


PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
bad branches can sometimes cause the whole tree to collapse.
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

[toc] | [prev] | [next] | [standalone]


#16285

FromChristoph Becker <cmbecker69@gmx.de>
Date2012-09-30 23:24 +0200
Message-ID<k4ad84$dat$2@speranza.aioe.org>
In reply to#16270
Thomas 'PointedEars' Lahn wrote:

[snip]

I stand corrected regarding all points.  Thanks for your comments. :-)
These show clearly that I obviously haven't understood the ECMAScript
Date object and how it is supposed to work (and apparently some more
general concepts of date/time).  I will consult the specs and other
readings and try to catch up on this.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#16288

FromDr J R Stockton <reply1239@merlyn.demon.co.uk.invalid>
Date2012-09-30 19:55 +0100
Message-ID<egbfg1QhWJaQFw7O@invalid.uk.co.demon.merlyn.invalid>
In reply to#16238
In comp.lang.javascript message <k45dmn$8j7$1@speranza.aioe.org>, Sat,
29 Sep 2012 02:00:31, Christoph Becker <cmbecker69@gmx.de> posted:

>Dr J R Stockton wrote:
>> In comp.lang.javascript message <k401aj$jnh$1@speranza.aioe.org>, Thu,
>> 27 Sep 2012 00:58:35, Christoph Becker <cmbecker69@gmx.de> posted:
>>
>>> justaguy wrote:
>>>> how do we get tomorrow based on today?
>>
>>> So a simple solution is:
>>       xxxxxx naive
>>>
>>> var today = new Date();
>>> var tomorrow = new Date(today.getTime() + 86400000)
>>
>> And what happens when the interval crosses 01:00 UTC on the last Sundays
>> of March and October? (dates and times are different for chronologically
>> inconvenient locations).
>
>I *thought* a day is defined as having 86,400 seconds (cf.
><http://www.bipm.org/en/si/si_brochure/chapter4/table6.html>).  If I am
>mistaken in this view, please correct me -- I'll appreciate an
>explanation or a link to one.

You had one, near enough, in my sig.  The above link refers, manifestly,
to SI days.  Civil days may vary from that by -1, -0.5, +0.5, +1 hours
and also +1 second and -1 second.  The legal UK civil day is still, I
believe, GMT-based, so the +1/-1 second is here in principle replaced by
a rather small fraction of a second.  (Then there are sidereal days,
Martian days, ... )

>If you were referring to summer time issues, AFAIK this wouldn't be
>relevant here, as the calculation is "internal", and the results
>/should/ be faithfully presented in human readable form by calling
>toLocalDateString().

AFAYK != AFAIK.

D1 = new Date("2012 Mar 24 23:30")   // Sat Mar 24 2012 23:30:00
D2 = new Date(D1.getTime() + 864e5)  // Mon Mar 26 2012 00:30:00

D1 = new Date("2012 Oct 28 00:30")   // Sun Oct 28 2012 00:30:00
D2 = new Date(D1.getTime() + 864e5)  // Sun Oct 28 2012 23:30:00

Those not testing in the British Isles may have to adjust the times
and/or the dates - especially any with the OS set for LHI.

JavaScript date work should, wherever practical, be done with the UTC
functions.

-- 
 (c) John Stockton, nr London, UK.    ?@merlyn.demon.co.uk     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.

[toc] | [prev] | [next] | [standalone]


#16208

FromDr J R Stockton <reply1239@merlyn.demon.co.uk.invalid>
Date2012-09-27 21:32 +0100
Message-ID<vLOUbtJkfLZQFwnV@invalid.uk.co.demon.merlyn.invalid>
In reply to#16157
In comp.lang.javascript message <6aae09ab-0d45-4c30-accf-909d7445c6a2@o8
g2000yqm.googlegroups.com>, Wed, 26 Sep 2012 14:47:31, justaguy
<lichunshen84@gmail.com> posted:

>
>var today = new Date();
>       today = today.toDateString();
>       // alert(today);
>       // all good
>
>how do we get tomorrow based on today?
>var tomorrow = today + 1
>// definitely won't work
>// and javascript does not something like dateAdd function or method
>// googling get some long worded code to get a little thing done, your
>thoughts?

Read <http://www.merlyn.demon.co.uk/js-dates.htm> and its friends, and
save the rest of us getting terribly terribly tired of you.

Also, please indicate whether you come from an English-speaking country,
or the USA, or elsewhere.  It will help us to judge your IQ from tour
writing, which is all we have to go on,  Otherwise, the worst is likely
to be assumed.

-- 
(c) John Stockton, nr London UK.  ???@merlyn.demon.co.uk  Turnpike v6.05  MIME.
 Web  <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
     Check boilerplate spelling -- error is a public sign of incompetence.
    Never fully trust an article from a poster who gives no full real name.

[toc] | [prev] | [next] | [standalone]


#16210

FromChristoph Becker <cmbecker69@gmx.de>
Date2012-09-28 01:03 +0200
Message-ID<k42lvo$rbf$1@speranza.aioe.org>
In reply to#16208
Dr J R Stockton wrote:
> Also, please indicate whether you come from an English-speaking country,
> or the USA

Could you /please/ define "English-speaking country".  In school and
later on I learned that there are differences between British English
and American English, but it seems you're classifying both as different
languages.  This is quite confusing for me, as because I'm a native
German speaker with only a rough understanding of the English language,
I'm not able to assess this.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#16214

FromGene Wirchenko <genew@ocis.net>
Date2012-09-27 16:36 -0700
Message-ID<ojo968t8d0048946p5l5b6pogdruq49dm7@4ax.com>
In reply to#16210
On Fri, 28 Sep 2012 01:03:19 +0200, Christoph Becker
<cmbecker69@gmx.de> wrote:

>Dr J R Stockton wrote:
>> Also, please indicate whether you come from an English-speaking country,
>> or the USA
>
>Could you /please/ define "English-speaking country".  In school and
>later on I learned that there are differences between British English
>and American English, but it seems you're classifying both as different
>languages.  This is quite confusing for me, as because I'm a native
>German speaker with only a rough understanding of the English language,
>I'm not able to assess this.

     A country where English is a major language.  Yes, there are
differences between British and U.S. English (and other English
dialects as well).  Some people play up the differences and pretend
that British English and U.S. English are different languages.  They
are not.

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#16222

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-09-28 10:37 +0200
Message-ID<1466762.Boop0VoolY@PointedEars.de>
In reply to#16210
Christoph Becker wrote:

> Dr J R Stockton wrote:
>> Also, please indicate whether you come from an English-speaking country,
>> or the USA
> 
> Could you /please/ define "English-speaking country".  In school and
> later on I learned that there are differences between British English
> and American English, but it seems you're classifying both as different
> languages.  This is quite confusing for me, as because I'm a native
> German speaker with only a rough understanding of the English language,
> I'm not able to assess this.

Please do not feed the troll.


PointedEars
-- 
    realism:    HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness:    XHTML 1.1 as application/xhtml+xml
                                                    -- Bjoern Hoehrmann

[toc] | [prev] | [next] | [standalone]


#16253

FromDr J R Stockton <reply1239@merlyn.demon.co.uk.invalid>
Date2012-09-29 20:39 +0100
Message-ID<ZErpIsIz50ZQFwQw@invalid.uk.co.demon.merlyn.invalid>
In reply to#16210
In comp.lang.javascript message <k42lvo$rbf$1@speranza.aioe.org>, Fri,
28 Sep 2012 01:03:19, Christoph Becker <cmbecker69@gmx.de> posted:

>Dr J R Stockton wrote:
>> Also, please indicate whether you come from an English-speaking country,
>> or the USA
>
>Could you /please/ define "English-speaking country".  In school and
>later on I learned that there are differences between British English
>and American English, but it seems you're classifying both as different
>languages.  This is quite confusing for me, as because I'm a native
>German speaker with only a rough understanding of the English language,
>I'm not able to assess this.

The languages are different but with considerable overlap (linguistic
differences rarely affect careful technical writing such as should be
used here).  I think the same may be true in regard to the German of
Germany, Switzerland, and Austria; and the French of France and Belgium.
It is certainly true in regard to the Latin of Caesar and of Euler.

But you have mis-parsed what I wrote, as has the local OAF.  There is an
implicit "or not;" after "country".  There are therefore two questions;
English-speaking or other, and USA or other.  The latter is because of
the nature of the USA & its people; and especially their weirdness in
respect of writing date and time.

-- 
 (c) John Stockton, nr London, UK.    ?@merlyn.demon.co.uk     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.

[toc] | [prev] | [next] | [standalone]


#16286

FromChristoph Becker <cmbecker69@gmx.de>
Date2012-09-30 23:37 +0200
Message-ID<k4ae1n$frr$1@speranza.aioe.org>
In reply to#16253
Dr J R Stockton wrote:
> But you have mis-parsed what I wrote, as has the local OAF.  There is an
> implicit "or not;" after "country".  There are therefore two questions;
> English-speaking or other, and USA or other.
                             ^^^

Ah, now I understand. :-)

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#16212

FromAndrew Poulos <ap_prog@hotmail.com>
Date2012-09-28 09:25 +1000
Message-ID<EumdnW8plO_1ffnNnZ2dnUVZ_gednZ2d@westnet.com.au>
In reply to#16208
On 28/09/2012 6:32 AM, Dr J R Stockton wrote:

> or the USA, or elsewhere.  It will help us to judge your IQ from tour
> writing, which is all we have to go on.  Otherwise, the worst is likely

Bummer about using "tour" (when you probably meant "your") while trying 
to insult some anonymous person about their lack of intelligence :-)

Andrew Poulos

[toc] | [prev] | [next] | [standalone]


#16230

FromDaniel Pitts <newsgroup.nospam@virtualinfinity.net>
Date2012-09-28 08:37 -0700
Message-ID<Suj9s.3882$sB3.3218@newsfe05.iad>
In reply to#16208
On 9/27/12 1:32 PM, Dr J R Stockton wrote:
> In comp.lang.javascript message <6aae09ab-0d45-4c30-accf-909d7445c6a2@o8
> g2000yqm.googlegroups.com>, Wed, 26 Sep 2012 14:47:31, justaguy
> <lichunshen84@gmail.com> posted:
>
>>
>> var today = new Date();
>>        today = today.toDateString();
>>        // alert(today);
>>        // all good
>>
>> how do we get tomorrow based on today?
>> var tomorrow = today + 1
>> // definitely won't work
>> // and javascript does not something like dateAdd function or method
>> // googling get some long worded code to get a little thing done, your
>> thoughts?
>
> Read <http://www.merlyn.demon.co.uk/js-dates.htm> and its friends, and
> save the rest of us getting terribly terribly tired of you.
>
> Also, please indicate whether you come from an English-speaking country,
> or the USA, or elsewhere.  It will help us to judge your IQ from tour
> writing, which is all we have to go on,  Otherwise, the worst is likely
> to be assumed.
Why should we judge someone's IQ at all? Why not always speak/write as 
clearly we possibly can, explaining things with intuitive analogies, 
using as few ambiguous clauses as possible.

The original poster is not the *only* audience for your posts.  So 
someone who comes by later and has a similar problem as the OP can also 
learn from your responses, whether their (perceived) IQ is higher or 
lower than the OP's (perceived) IQ.

Just because you put Dr before your name, doesn't make you better or 
smarter than *anyone* else. Do you even really have a PhD? Do you really 
think that matters?  Your condescension should make you feel ashamed of 
yourself.

Oh, and as for getting tired of a poster, no one asked *you* personally 
to read all of their posts.  If you don't feel like answering politely 
and in the spirit of community, you may as well delete your news-reader 
and leave us alone.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web