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


Groups > comp.lang.javascript > #11191

Re: Looking for a Monday-Friday J/S

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="ISO-8859-1"
Message-ID <2260195.FRqVoOGUtd@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Organization PointedEars Software (PES)
Date Sat, 04 Feb 2012 14:02:40 +0100
User-Agent KNode/4.4.11
Content-Transfer-Encoding 7Bit
Subject Re: Looking for a Monday-Friday J/S
Newsgroups comp.lang.javascript
References <dennism3-ya02408000R0302122054100001@news.datemas.de> <orapi7tcpscq199g7f1njul5l479re9vck@4ax.com>
Followup-To comp.lang.javascript
MIME-Version 1.0
Lines 45
NNTP-Posting-Date 04 Feb 2012 14:02:40 CET
NNTP-Posting-Host 6ab916f6.newsspool1.arcor-online.net
X-Trace DXC=64fdT8e`b71lIh70@<QIE7ic==]BZ:af>4Fo<]lROoR1<`=YMgDjhg2jVQdlSRe[b?DZm8W4\YJN<b@mF9jNikd5lYEA^Z8=X`0m8DKVmk7YF1
X-Complaints-To usenet-abuse@arcor.de
Xref x330-a1.tempe.blueboxinc.net comp.lang.javascript:11191

Followups directed to: comp.lang.javascript

Show key headers only | View raw


Jeff North wrote:

> (Dennis M) wrote:
>>| One of my sites is a free link directory that's becoming increasingly
>>| popular and so it doesn't drive me crazy approving new submissions I was
>>| wanting to install a javascript on the link submission page that would
>>| load that page on Monday through Friday, then on the weekends load a
>>| page where I could say I "only accept new submissions M-F." Anybody?
>>| Looked around on a well known javascript site but couldn't find what I
>>| want to do.
> 
> Bad idea. If the visitor has javascript turned off then your script
> will not work.

ACK.

> Is the Mon-Fri your time, the ISP time? I'm in Australia so on *my*
> Monday I still wouldn't be able make a submission.

No, you would, because client-side scripts by default use your system-local 
time, and _not_ that of the server.  You would not be able to submit if this 
was done on the server or the server time was used by the client-side 
script, and it was still Sunday there, but not at your location.

Since the author's local time, the server's local time, and the visitor's 
local time may all be different, it appears to be a good idea to settle on 
UTC.

> But if you insist. Have a look at the Date object and getDay().
> 
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getDay

That would be 

<https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getUTCDay>

then.
 

PointedEars
-- 
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

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


Thread

Looking for a Monday-Friday J/S dennism3@dennism3.invalid (Dennis M) - 2012-02-03 20:54 -0600
  Re: Looking for a Monday-Friday J/S Jeff North <jnorthau@yahoo.com.au> - 2012-02-04 14:58 +1100
    Re: Looking for a Monday-Friday J/S dennism3@dennism3.invalid (Dennis M) - 2012-02-03 22:33 -0600
      Re: Looking for a Monday-Friday J/S Swifty <steve.j.swift@gmail.com> - 2012-02-04 08:56 +0000
        Re: Looking for a Monday-Friday J/S "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-02-04 09:11 +0000
          Re: Looking for a Monday-Friday J/S Dr J R Stockton <reply1205@merlyn.demon.co.uk> - 2012-02-05 17:50 +0000
            Re: Looking for a Monday-Friday J/S "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-02-06 11:22 +0000
              Re: Looking for a Monday-Friday J/S Dr J R Stockton <reply1206@merlyn.demon.co.uk> - 2012-02-07 22:17 +0000
                Re: Looking for a Monday-Friday J/S "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-02-08 08:56 +0000
                Re: Looking for a Monday-Friday J/S Gene Wirchenko <genew@ocis.net> - 2012-02-08 09:22 -0800
                Re: Looking for a Monday-Friday J/S "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-02-09 16:49 +0000
                Re: Looking for a Monday-Friday J/S Dr J R Stockton <reply1206@merlyn.demon.co.uk> - 2012-02-09 18:53 +0000
                Re: Looking for a Monday-Friday J/S "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-02-10 08:13 +0000
                Re: Looking for a Monday-Friday J/S Dr J R Stockton <reply1206@merlyn.demon.co.uk> - 2012-02-11 23:12 +0000
                Re: Looking for a Monday-Friday J/S John G Harris <john@nospam.demon.co.uk> - 2012-02-10 16:02 +0000
                Re: Looking for a Monday-Friday J/S Dr J R Stockton <reply1206@merlyn.demon.co.uk> - 2012-02-11 23:24 +0000
        Re: Looking for a Monday-Friday J/S Andrew Poulos <ap_prog@hotmail.com> - 2012-02-04 20:13 +1100
          Re: Looking for a Monday-Friday J/S Swifty <steve.j.swift@gmail.com> - 2012-02-05 10:01 +0000
            Re: Looking for a Monday-Friday J/S Andrew Poulos <ap_prog@hotmail.com> - 2012-02-06 08:00 +1100
              Re: Looking for a Monday-Friday J/S Swifty <steve.j.swift@gmail.com> - 2012-02-06 12:20 +0000
        Re: Looking for a Monday-Friday J/S dennism3@dennism3.invalid (Dennis M) - 2012-02-07 01:05 -0600
    Re: Looking for a Monday-Friday J/S Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-04 14:02 +0100
  Re: Looking for a Monday-Friday J/S Dr J R Stockton <reply1205@merlyn.demon.co.uk> - 2012-02-05 17:41 +0000
  Re: Looking for a Monday-Friday J/S Captain Paralytic <paul_lautman@yahoo.com> - 2012-02-07 05:18 -0800

csiph-web