By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,490 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,490 IT Pros & Developers. It's quick & easy.

javascript time selector

P: n/a
Hi all:

There are many javascript date selector available which help you input
date in a text field. And we see a lot of this on travel site when you
select date for air ticket. Could anyone point me a time selector? I am
looking for something that can input time as 12:00:00 AM.

Thanks,

qq

Jan 17 '06 #1
Share this Question
Share on Google+
12 Replies


P: n/a
qu******@yahoo.com wrote:
There are many javascript date selector available which help you input
date in a text field. And we see a lot of this on travel site when
you select date for air ticket. Could anyone point me a time
selector? I am looking for something that can input time as 12:00:00
AM.


You are implying you want me (the visitor) to input the current time on
*my* computer. Are you sure you want to do that? Due to my depleted
CMOS battery, my current time is ... four days, six hours, nine minutes
ago.

--
-bts
-Warning: I brake for lawn deer
Jan 17 '06 #2

P: n/a
did you try searching the internet?

Google: javascript time selector
First hit
http://www.javascriptkit.com/script/...calendar.shtml

Jan 17 '06 #3

P: n/a
JRS: In article <11*********************@g47g2000cwa.googlegroups. com>,
dated Tue, 17 Jan 2006 09:51:06 remote, seen in news:comp.infosystems.ww
w.authoring.html, qu******@yahoo.com posted :
There are many javascript date selector available which help you input
date in a text field.
One wonders what you think the *.javascript newsgroups were created for.
And we see a lot of this on travel site when you
select date for air ticket. Could anyone point me a time selector?
See in <URL:http://www.merlyn.demon.co.uk/js-date6.htm>.
I am
looking for something that can input time as 12:00:00 AM.


That's FFF. On the Web, international standards should be followed.

12:00:00 AM itself, of course, is ridiculous.
*** DO NOT MULTI-POST ***

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jan 17 '06 #4

P: n/a
Dr John Stockton wrote:
JRS: In article <11*********************@g47g2000cwa.googlegroups. com>,
dated Tue, 17 Jan 2006 09:51:06 remote, seen in news:comp.infosystems.ww
w.authoring.html, qu******@yahoo.com posted : [...]
I am
looking for something that can input time as 12:00:00 AM.

That's FFF. On the Web, international standards should be followed.

12:00:00 AM itself, of course, is ridiculous.


The OP is clearly referring to midnight since it is both 12 am and 12 pm
simultaneously - noon is neither. ;-)

--
Rob
Jan 18 '06 #5

P: n/a
On Wed, 18 Jan 2006 04:00:51 GMT, RobG <rg***@iinet.net.au> wrote:
The OP is clearly referring to midnight since it is both 12 am and 12 pm
simultaneously - noon is neither. ;-)


12am = midnight
12pm = noon

-- Steven

Jan 18 '06 #6

P: n/a
Steven wrote:
On Wed, 18 Jan 2006 04:00:51 GMT, RobG <rg***@iinet.net.au> wrote:

The OP is clearly referring to midnight since it is both 12 am and 12 pm
simultaneously - noon is neither. ;-)

12am = midnight
12pm = noon


That might agree with colloquial use in a few places, but I don't think
you'll find a single authority that will agree with you.

The terms 12 am and 12 pm are confusing and should never be used.

<URL:http://wwp.greenwichmeantime.com/info/noon.htm>
<URL:http://tf.nist.gov/general/misc.htm#Anchor-57026>
<URL:http://www.worldtimezone.com/wtz-names/wtz-am-pm.html>

--
Rob
Jan 18 '06 #7

P: n/a
On Wed, 18 Jan 2006 05:42:19 GMT, RobG <rg***@iinet.net.au> wrote:
Steven wrote:
12am = midnight
12pm = noon
That might agree with colloquial use in a few places, but I don't think
you'll find a single authority that will agree with you.


I will investigate.
The terms 12 am and 12 pm are confusing and should never be used.
Yes they are confusing. I always put it down to the fact that people
like numbering things from 1 not 0. So in this case 12am is really 0am.
I still think that 12am (0am) is valid because the day starts at 0 and
it is before midday. Similarly, 12pm is really 0pm which is 0 hours
after midday.

A local shop advertised its opening hours as 7:30am to 12:00am. This
sounded like a short day but of course it wasn't.
<URL:http://wwp.greenwichmeantime.com/info/noon.htm>
<URL:http://tf.nist.gov/general/misc.htm#Anchor-57026>
<URL:http://www.worldtimezone.com/wtz-names/wtz-am-pm.html>


These links do suggest that 12am and 12pm are taboo. I certainly won't
mind if everybody uses a 24-hour clock instead. However, 12am and 12pm
do appear frequently and I know what they mean.

-- Steven

Jan 18 '06 #8

P: n/a
JRS: In article <1h*****************************@40tude.net>, dated
Tue, 17 Jan 2006 18:47:11 remote, seen in news:comp.infosystems.www.auth
oring.html, Beauregard T. Shagnasty <a.*********@example.invalid> posted
:
qu******@yahoo.com wrote:
There are many javascript date selector available which help you input
date in a text field. And we see a lot of this on travel site when
you select date for air ticket. Could anyone point me a time
selector? I am looking for something that can input time as 12:00:00
AM.


You are implying you want me (the visitor) to input the current time on
*my* computer. Are you sure you want to do that? Due to my depleted
CMOS battery, my current time is ... four days, six hours, nine minutes
ago.


You're being silly.

If the computer's idea of the current time were wanted, then the code
would get it directly, perhaps when authorised by a "click".

Those with access to a watch or clock can easily input the current time,
near enough.

In selecting date or time for an air ticket, it must be rare to use the
current time; usually the future, sometimes the past, will be
appropriate.

And, since he wants to be able to choose 12:00:00 AM, then to get that
from the computer clock would require the "Eccles" method.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jan 18 '06 #9

P: n/a
Dr John Stockton wrote:
Beauregard T. Shagnasty posted
:
qu******@yahoo.com wrote:
There are many javascript date selector available which help you
input date in a text field. And we see a lot of this on travel site
when you select date for air ticket. Could anyone point me a time
selector? I am looking for something that can input time as
12:00:00 AM.
You are implying you want me (the visitor) to input the current time
on *my* computer. Are you sure you want to do that? Due to my
depleted CMOS battery, my current time is ... four days, six hours,
nine minutes ago.


You're being silly.


Of course.
If the computer's idea of the current time were wanted, then the code
would get it directly, perhaps when authorised by a "click".

Those with access to a watch or clock can easily input the current
time, near enough.
...though a bit hard for a script to use those watches and clocks.
In selecting date or time for an air ticket, it must be rare to use
the current time; usually the future, sometimes the past, will be
appropriate.


My point exactly. Sorry you didn't understand how I wrote it. I should
have wrapped it in <humour> tags.

--
-bts
-Warning: I brake for lawn deer
Jan 18 '06 #10

P: n/a
RobG wrote:
Steven wrote:
On Wed, 18 Jan 2006 04:00:51 GMT, RobG <rg***@iinet.net.au> wrote:

The OP is clearly referring to midnight since it is both 12 am and 12 pm
simultaneously - noon is neither. ;-)

12am = midnight
12pm = noon


That might agree with colloquial use in a few places, but I don't think
you'll find a single authority that will agree with you.

The terms 12 am and 12 pm are confusing and should never be used.


I don't find the reference to 12 pm very confusing in a context like:

10am
11am
12pm
1pm
2pm

- I would say it's pretty clear which 12 is intended in that case.

Jan 18 '06 #11

P: n/a
JRS: In article <g0********************************@4ax.com>, dated
Wed, 18 Jan 2006 16:04:10 remote, seen in news:comp.infosystems.www.auth
oring.html, Steven <No*****@Syd.au> posted :
On Wed, 18 Jan 2006 04:00:51 GMT, RobG <rg***@iinet.net.au> wrote:
The OP is clearly referring to midnight since it is both 12 am and 12 pm
simultaneously - noon is neither. ;-)


12am = midnight
12pm = noon


(a) One cannot rely on people understanding that and getting it right.

(b) The initial or the final midnight of the day?

Midnight is usually taken as ending the day; 12 a.m. as starting it.

Using ISO 8601 is unambiguous; for a given day, 00:00, 12:00, & 24:00
are at 12-hour intervals.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jan 18 '06 #12

P: n/a
On Wed, 18 Jan 2006 18:53:50 +0000, Dr John Stockton
<jr*@merlyn.demon.co.uk> wrote:
JRS: In article <g0********************************@4ax.com>, dated
Wed, 18 Jan 2006 16:04:10 remote, seen in news:comp.infosystems.www.auth
oring.html, Steven <No*****@Syd.au> posted :
On Wed, 18 Jan 2006 04:00:51 GMT, RobG <rg***@iinet.net.au> wrote:
The OP is clearly referring to midnight since it is both 12 am and 12 pm
simultaneously - noon is neither. ;-)
12am = midnight
12pm = noon


(a) One cannot rely on people understanding that and getting it right.


I don't have a problem with the terms midnight and noon. I do disagree
with the statement that both 12am and 12pm are midnight. With a 12-hour
clock the day is split into halves. The first hour in each half should
be zero but for some reason it is called 12. So 12am is 0am is the
start of the first half and 12pm is 0pm is the start of the second half.
If you don't like 0 hours just remember that 12:30pm is lunchtime and
12pm is half an hour before. The statement that 12pm is twleve hours
after midday is incorrect because hours aren't labelled that way.
(b) The initial or the final midnight of the day?

Midnight is usually taken as ending the day; 12 a.m. as starting it.
I would argue that midnight is the start of the next day because the day
increments as the hour wraps around. However, I agree that most people
would regard midnight on the 19th to be the end of the 19th day rather
than the start. For this reason I would use 12am instead.

This thread started with a question about accepting time entries and
used 12:00:00am as an example. Most people I know don't like or use
24-hour time so accepting am/pm entires sounds good to me. An adjacent
note saying 12pm is midday and 12am is midnight (start of day) would be
a good idea.
Using ISO 8601 is unambiguous; for a given day, 00:00, 12:00, & 24:00
are at 12-hour intervals.


I think ISO 8601 is great and use it whenever I'm not forced to do
otherwise. Isn't 24:00 a great feature here.

-- Steven

Jan 19 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.