absent(message, args) {
        //Just use the first three letters of the month to avoid confusion:
        let shortMonth = args[0].substring(0,3);
        if (args[2]) {
            var shortEndMonth = args[2].substring(0,3);
        }

        //Make sure we have start and end dates.
        if (dateTools.checkIsMonth(shortMonth)) {
            var startYear = dateTools.determineYear(shortMonth, args[1].replace(/\D/g, ""));
            if (dateTools.checkIsDate(shortMonth, args[1].replace(/\D/g, ""), startYear)) {
                var startDay = args[1].replace(/\D/g, "");
                var combinedStartDate = shortMonth + " " + startDay + " " + startYear;
                var startDate = dateTools.validateDates(message, combinedStartDate, undefined);
            }
            //Process Comments
            var comment = args.slice(2).join(' ');
        }
        if (dateTools.checkIsMonth(shortEndMonth) && dateTools.checkIsDayOfMonth(args[3].replace(/\D/g, ""))) {
            //Make sure end year is equal or greater to start year.
            ///HMM
            if (dateTools.getCurrentYear() >= startYear) {
                var endYear = dateTools.determineYear(shortEndMonth, args[3].replace(/\D/g, ""));
            } else {
                var endYear = startYear;
            }
            if (dateTools.checkIsDate(shortEndMonth, args[3].replace(/\D/g, ""), endYear)) {
                var endDay = args[3].replace(/\D/g, "");
                var combinedEndDate = shortEndMonth + " " + endDay + " " + endYear;
                var endDate = dateTools.validateDates(message, undefined, combinedEndDate);
                //Process Comments
                var comment = args.slice(4).join(' ');
            }
        } else {
            var endDate = startDate;
            var comment = args.slice(2).join(' ');
        }
        //Get the nickname
        var nickname = getNicknames(message);
        nickname.then((result) => {
            if ((isValid(parseISO(startDate))) && (isValid(parseISO(endDate)))) {
                //If we have a range of days, let's store them individually... 
                //NOTE: Since raid days are Tue, Thu, Sun... we'll store only those.
                this.processDBUpdate(message, result.nickname, "absent", startDate, endDate, comment);
                this.generateResponse(message, "absent", "present", startDate, endDate, comment);
            } else {
                message.reply("Sorry, something went wrong. Please tell Doolan what command you typed.");
            }
        });
    }
//Commands absent, late, ontime, and present for scheduling.
Commands absent, late, ontime, and present for scheduling.
Commands absent late ontime and present for scheduling .
absent(message, args) {
        let shortMonth = args[0].substring(0,3);
        if (args[2]) {
            var shortEndMonth = args[2].substring(0,3);
        }
        if (dateTools.checkIsMonth(shortMonth)) {
            var startYear = dateTools.determineYear(shortMonth, args[1].replace(/\D/g, ""));
            if (dateTools.checkIsDate(shortMonth, args[1].replace(/\D/g, ""), startYear)) {
                var startDay = args[1].replace(/\D/g, "");
                var combinedStartDate = shortMonth + " " + startDay + " " + startYear;
                var startDate = dateTools.validateDates(message, combinedStartDate, undefined);
            }
            var comment = args.slice(2).join(' ');
        }
        if (dateTools.checkIsMonth(shortEndMonth) && dateTools.checkIsDayOfMonth(args[3].replace(/\D/g, ""))) {
            if (dateTools.getCurrentYear() >= startYear) {
                var endYear = dateTools.determineYear(shortEndMonth, args[3].replace(/\D/g, ""));
            } else {
                var endYear = startYear;
            }
            if (dateTools.checkIsDate(shortEndMonth, args[3].replace(/\D/g, ""), endYear)) {
                var endDay = args[3].replace(/\D/g, "");
                var combinedEndDate = shortEndMonth + " " + endDay + " " + endYear;
                var endDate = dateTools.validateDates(message, undefined, combinedEndDate);
                var comment = args.slice(4).join(' ');
            }
        } else {
            var endDate = startDate;
            var comment = args.slice(2).join(' ');
        }
        var nickname = getNicknames(message);
        nickname.then((result) => {
            if ((isValid(parseISO(startDate))) && (isValid(parseISO(endDate)))) {
                this.processDBUpdate(message, result.nickname, "absent", startDate, endDate, comment);
                this.generateResponse(message, "absent", "present", startDate, endDate, comment);
            } else {
                message.reply("Sorry, something went wrong. Please tell Doolan what command you typed.");
            }
        });
    }
absent ( message , args ) { let shortMonth = args [ 0 ] . substring ( 0 , 3 ) ; if ( args [ 2 ] ) { var shortEndMonth = args [ 2 ] . substring ( 0 , 3 ) ; } if ( dateTools . checkIsMonth ( shortMonth ) ) { var startYear = dateTools . determineYear ( shortMonth , args [ 1 ] . replace ( / \D / g , "" ) ) ; if ( dateTools . checkIsDate ( shortMonth , args [ 1 ] . replace ( / \D / g , "" ) , startYear ) ) { var startDay = args [ 1 ] . replace ( / \D / g , "" ) ; var combinedStartDate = shortMonth + " " + startDay + " " + startYear ; var startDate = dateTools . validateDates ( message , combinedStartDate , undefined ) ; } var comment = args . slice ( 2 ) . join ( ' ' ) ; } if ( dateTools . checkIsMonth ( shortEndMonth ) && dateTools . checkIsDayOfMonth ( args [ 3 ] . replace ( / \D / g , "" ) ) ) { if ( dateTools . getCurrentYear ( ) >= startYear ) { var endYear = dateTools . determineYear ( shortEndMonth , args [ 3 ] . replace ( / \D / g , "" ) ) ; } else { var endYear = startYear ; } if ( dateTools . checkIsDate ( shortEndMonth , args [ 3 ] . replace ( / \D / g , "" ) , endYear ) ) { var endDay = args [ 3 ] . replace ( / \D / g , "" ) ; var combinedEndDate = shortEndMonth + " " + endDay + " " + endYear ; var endDate = dateTools . validateDates ( message , undefined , combinedEndDate ) ; var comment = args . slice ( 4 ) . join ( ' ' ) ; } } else { var endDate = startDate ; var comment = args . slice ( 2 ) . join ( ' ' ) ; } var nickname = getNicknames ( message ) ; nickname . then ( ( result ) => { if ( ( isValid ( parseISO ( startDate ) ) ) && ( isValid ( parseISO ( endDate ) ) ) ) { this . processDBUpdate ( message , result . nickname , "absent" , startDate , endDate , comment ) ; this . generateResponse ( message , "absent" , "present" , startDate , endDate , comment ) ; } else { message . reply ( "Sorry, something went wrong. Please tell Doolan what command you typed." ) ; } } ) ; }
Commands absent, late, ontime, and present for scheduling.
Commands absent late ontime and present for scheduling .
//Just use the first three letters of the month to avoid confusion: //Make sure we have start and end dates. //Process Comments //Make sure end year is equal or greater to start year. ///HMM //Process Comments //Get the nickname //If we have a range of days, let's store them individually...  //NOTE: Since raid days are Tue, Thu, Sun... we'll store only those.