[Cialug] Javascript help

Tad Anhalt tja at netins.net
Mon Nov 7 19:49:26 CST 2005


Kevin C. Smith wrote:
> FYI, it is in fact time. People enter 13.5 for 1:30 PM, 13.25 for 1:15 PM,
> etc. It's time measured in quarter hours. It's how we bill and report
> hours.

   Excellent.  Ignore everything that I wrote then, it sounds like you 
already have the "why" covered, did you ever manage to get the "how" 
part working?

   If not,  try something like this:

/((^[0-2][0-3])|(^[0-1]?[0-9]))\.(0?0$|25$|50?$|75$)/

   One possible problem that you may run into is that this method will 
break if there is white space at the beginning/end of line.  If you 
can't live with that, you'll need to provide a way for it to match. 
Either trim() the string before processing or add a specific match for 
whitespace after every ^ and before every $.

Tad Anhalt


More information about the Cialug mailing list