nl_tokens: ======================================================== Determines if first date completely includes second date NOTE : This is a shallow test ( no patterns tested )
pl_tokens: function dateShallowIncludesDate ( date1 , date2 ) { // First date is simple date if ( date1 . isDate ) { if ( date2 . isDate ) return date1 . dateTime === date2 . dateTime ; if ( ! date2 . startTime || ! date2 . endTime ) return false ; return ( date1 . dateTime === date2 . startTime && date1 . dateTime === date2 . endTime ) ; } // Second date is simple date and first is date range if ( date2 . isDate ) { if ( date1 . start && date2 . date < date1 . start ) return false ; if ( date1 . end && date2 . date > date1 . end ) return false ; return true ; } // Both dates are date ranges if ( date1 . start && ( ! date2 . start || date2 . start < date1 . start ) ) return false ; if ( date1 . end && ( ! date2 . <mask> || date2 . end > date1 . end ) ) return false ; return true ; }