nl_tokens: * @method is ( <d > [ margin ] = 0 ) @returns Boolean @short Returns true if the date is <d > . @extra <d > will accept a date object timestamp or text format . %is% additionally understands more generalized expressions like month / weekday names today etc and compares to the precision implied in <d > . [ margin ] allows an extra margin of error in milliseconds . For more see @date_format . @example
pl_tokens: function ( d , margin , utc ) { var tmp , comp ; if ( ! this . isValid ( ) ) return ; if ( isString ( d ) ) { d = d . trim ( ) . toLowerCase ( ) ; comp = this . clone ( ) . utc ( utc ) ; switch ( true ) { <mask> d === 'future' : return this . getTime ( ) > new date ( ) . getTime ( ) ; case d === 'past' : return this . getTime ( ) < new date ( ) . getTime ( ) ; case d === 'weekday' : return callDateGet ( comp , 'Day' ) > 0 && callDateGet ( comp , 'Day' ) < 6 ; case d === 'weekend' : return callDateGet ( comp , 'Day' ) === 0 || callDateGet ( comp , 'Day' ) === 6 ; case ( tmp = English [ 'weekdays' ] . indexOf ( d ) % 7 ) > - 1 : return callDateGet ( comp , 'Day' ) === tmp ; case ( tmp = English [ 'months' ] . indexOf ( d ) % 12 ) > - 1 : return callDateGet ( comp , 'Month' ) === tmp ; } } return compareDate ( this , d , margin , utc ) ; }