nl_tokens: Provides a convenient method for performing basic date arithmetic . This method does not modify the Date instance being called - it creates and returns a new Date instance containing the resulting date value .
pl_tokens: function ( date , interval , value ) { var d = Ext . Date . clone ( date ) ; if ( ! interval || value === 0 ) return d ; switch ( interval . toLowerCase ( ) ) { case Ext . Date . MILLI : d = new Date ( d . valueOf ( ) + value ) ; break ; case Ext . Date . SECOND : d = new Date ( d . valueOf ( ) + value * 1000 ) ; break ; case Ext . Date . MINUTE : d = new Date ( d . valueOf ( ) + value * 60000 ) ; break ; case Ext . Date . HOUR : d = new Date ( d . valueOf ( ) + value * 3600000 ) ; break ; case Ext . Date . DAY : d = new Date ( d . valueOf ( ) + value * 86400000 ) ; break ; case Ext . Date . MONTH : var day = date . getDate ( ) ; if ( day > 28 ) { day = Math . min ( day , Ext . <mask> . getLastDateOfMonth ( Ext . Date . add ( Ext . Date . getFirstDateOfMonth ( date ) , 'mo' , value ) ) . getDate ( ) ) ; } d . setDate ( day ) ; d . setMonth ( date . getMonth ( ) + value ) ; break ; case Ext . Date . YEAR : d . setFullYear ( date . getFullYear ( ) + value ) ; break ; } return d ; }