472,143 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

javascript time selector

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
12 20514
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
did you try searching the internet?

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

Jan 17 '06 #3
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
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
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
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
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
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
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
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
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
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.

Similar topics

11 posts views Thread by George Hester | last post: by
12 posts views Thread by Duderonomoy | last post: by
10 posts views Thread by quickcur | last post: by
8 posts views Thread by pamelafluente | last post: by
20 posts views Thread by Neo Geshel | last post: by
3 posts views Thread by mfc1981 | last post: by
19 posts views Thread by maya | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.