dist/main.js
function(date) {
        if (this._calendar.name !== date._calendar.name) {
            throw (_exports.local.differentCalendars || _exports.regionalOptions[''].differentCalendars).
                replace(/\{0\}/, this._calendar.local.name).replace(/\{1\}/, date._calendar.local.name);
        }
        var c = (this._year !== date._year ? this._year - date._year :
            this._month !== date._month ? this.monthOfYear() - date.monthOfYear() :
            this._day - date._day);
        return (c === 0 ? 0 : (c < 0 ? -1 : +1));
    }
function(date) {
        if (this._calendar.name !== date._calendar.name) {
            throw (_exports.local.differentCalendars || _exports.regionalOptions[''].differentCalendars).
                replace(/\{0\}/, this._calendar.local.name).replace(/\{1\}/, date._calendar.local.name);
        }
        var c = (this._year !== date._year ? this._year - date._year :
            this._month !== date._month ? this.monthOfYear() - date.monthOfYear() :
            this._day - date._day);
        return (c === 0 ? 0 : (c < 0 ? -1 : +1));
    }
function ( date ) { if ( this . _calendar . name !== date . _calendar . name ) { throw ( _exports . local . differentCalendars || _exports . regionalOptions [ '' ] . differentCalendars ) . replace ( / \{0\} / , this . _calendar . local . name ) . replace ( / \{1\} / , date . _calendar . local . name ) ; } var c = ( this . _year !== date . _year ? this . _year - date . _year : this . _month !== date . _month ? this . monthOfYear ( ) - date . monthOfYear ( ) : this . _day - date . _day ) ; return ( c === 0 ? 0 : ( c < 0 ? - 1 : + 1 ) ) ; }
Compare this date to another date.
@memberof CDate
@param date {CDate} The other date.
@return {number} -1 if this date is before the other date,
0 if they are equal, or +1 if this date is after the other date.
Compare this date to another date .