This Class supplies an interface for setting date ranges and checking various dates against them. This can be used to pass time paramaters between colaborating classes It also allow colabortors to set each other's date-ranges by modifing the same range instance (each range gets a uniq dentifier to make sure that a range will not be mutable).
var range = new DateRange(new Date, +(new Date)+30000); //will set range between now and 30 seconds in the future. console.log(range.isValid(new Date)); //true setTimeout(function(){console.log(range.isValid(new Date));}, 40000); //false
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus