keithamus / tempus

Tempus - Time for a new Date()
http://tempus-js.com
Other
94 stars 9 forks source link

Feature request: timeString to autocomplete partially specified time strings #21

Closed giacecco closed 11 years ago

giacecco commented 11 years ago

Hi keithamus, What do you think to make timeString("NN:NN") equivalent to timeString("NN:NN:00")?

By extending the concept, you may set to zero any digit that is not specified, e.g. timeString("N") would become equivalent to timeString("N0:00:00").

Thanks!

G.

keithamus commented 11 years ago

I like the idea of being able to not specify chunks, as you say timeString("NN:NN") being equivalent to timeString("NN:NN:00"). However I don't like the idea of timeString("N").

If you want to make a pull request that'd be awesome! Be sure to add tests though!