arshaw / xdate

A Modern JavaScript Date Library
http://arshaw.com/xdate/
GNU General Public License v2.0
681 stars 81 forks source link

setMilliseconds functionality #6

Closed leetrout closed 12 years ago

leetrout commented 12 years ago

Hey Adam,

First, thanks so much for creating and sharing this library! It's been a HUGE help building a custom scheduling app.

I noticed the documentation states that setMilliseconds has the same behavior as setTime but this isn't the case in my experience.

I have a function that evaluates the start and end time of a given date range with a provided XD instance. There are times that the function call will show that the XD instance is outside the range (erroneously) because the date I am testing to be in the range was instantiated a millisecond before the range start and end dates.

I discovered, to my delight, that setMilliseconds does, in fact, zero out the milliseconds and solves my problem. Could you update the documentation when you get the chance to help other wayfarers?

JS Fiddle Proof: http://jsfiddle.net/psX5t/

Thanks!

arshaw commented 12 years ago

i updated the documentation on http://arshaw.com/xdate/#Getters

thanks!

arshaw commented 12 years ago

i mean http://arshaw.com/xdate/#Setters