Nodejs Date Before isBefore(date2)

Here you can find the source of isBefore(date2)

Method Source Code

Date.prototype.isBefore = function(date2)
{
   return this < date2
}

Related

  1. before(other)
    Date.prototype.before = function(other) {
        return this.compareTo(other) < 0;
    
  2. before(other)
    Date.prototype.before = function(other) {
        return this.compareTo(other) < 0;
    };
    Date.prototype.after = function(other) {
        return this.compareTo(other) > 0;
    };
    Date.prototype.withDate = function(date) {
        this.setFullYear(date.getFullYear());
        this.setMonth(date.getMonth());
    ...
    
  3. isBeforeDate(d)
    Date.prototype.isBeforeDate = function (d) {
        var tDate = new Date(this.getFullYear(), this.getMonth(), this.getDate());
        var pDate = new Date(d.getFullYear(), d.getMonth(), d.getDate());
        return tDate < pDate