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


Groups > comp.lang.javascript > #19466

Re: How to best check if a time hh:mm is within a range

Message-ID <85443254.jIUFstNyxt@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2013-04-25 13:02 +0200
Subject Re: How to best check if a time hh:mm is within a range
Newsgroups comp.lang.javascript
References <kl9kba$nlb$1@dont-email.me> <1776447.jtyAQvLSIL@PointedEars.de>

Show all headers | View raw


Thomas 'PointedEars' Lahn wrote:

> Tony Johansson wrote:
>> […]
>> For example if hh:mm from db is 23:05 and for example my header range is
>> this
>> 15:00     16:00     17:00     18:00     19:00     20:00     21:00
>> 22:00
>> […]
> 
> […]
> Because there are leading zeroes in the time format,

… *and* it is a 24-hours format …

> string comparison is the same as numeric comparison of the atoms, so
> conversion (to Number, or Date) is unnecessary.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

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


Thread

How to best check if  a time hh:mm is within a range "Tony Johansson" <johansson.andersson@telia.com> - 2013-04-24 23:57 +0200
  Re: How to best check if  a time hh:mm is within a range Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-25 01:42 +0200
    Re: How to best check if  a time hh:mm is within a range Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-25 13:02 +0200
  Re: How to best check if  a time hh:mm is within a range Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-04-26 21:03 +0100

csiph-web