I have a system in development which records various times of the day in the following format: 06:53:22 or 19:23:58 as examples.
Can anyone tell me if it is possible to convert this string into javascript construct which I can use to compare times of the day?
You can parse the time with this:
It returns a number of seconds since 00:00:00, so you can compare the results easily:
of course you can do it, but before you should parse this string.
date = new Date(year, month, day, hours, minutes, seconds, milliseconds)
- we creaeted new object. After we can usedate.getTime()
date.getFullYear
..js is smart enough to figure it out :)