pihentagy
unread,Oct 4, 2010, 11:14:02 AM10/4/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Datejs - A JavaScript Date Library
Hi!
I've found this cool library today.
However, here is my question.
It is true, that if I tell the format 'HH:mm', and I would like to
parse a time like '2:3', they did not match, but I'd like to solve my
problem:
I am using client-side formatting and parsing from db to GUI syntax,
and if the user happens to enter '2:3', I don't want to reject it just
because of the missing leading zero...
OTOH the time and date format should be configurable. I know I can
solve it with supplying an array of all combinations of leading zeros
switched on and off, but that is not so elegant (and may be too
complicated(.
Is there an easier solution?
thanks
Gergo