This project is archived and is in readonly mode.

#436 ✓resolved
Arian

Add parsers to parse Time strings in Date

Reported by Arian | November 8th, 2010 @ 10:48 PM | in 1.3.1.1

It isn't possible to use Date.Parse to parse strings like 10:05AM.

Adding the following parsers should make Date.parse able to do just that.

// Parse times
Date.defineParsers(
    '%H:%M%p', // "11:05pm"
    '%H:%M %p', // "11:05 pm"
    '%H:%M' // "11:05"
);

Notice that this isn't very optimized (the first two parsers can combined into one with some regex stuff).

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket

Pages