=this.convert(a).valueOf()) &&
                        isFinite(b=this.convert(b).valueOf()) ?
                        (a>b)-(a<b) :
                        NaN
                );
    },
    inRange:function(d,start,end) {
        // Checks if date in d is between dates in start and end.
        // Returns a boolean or NaN:
        //    true  : if d is between start and end (inclusive)
        //    false : if d is before start or after end
        //    NaN   : if one or more of the dates is illegal.
    