@@ -12,31 +12,19 @@ function equalsDate(d1, d2, message) {
1212 equal ( d1 . toString ( ) , d2 . toString ( ) , message ) ;
1313}
1414
15- function equalsDateArray ( a1 , a2 , message ) {
16- if ( ! a1 || ! a2 ) {
17- ok ( false , message + ' - missing dates' ) ;
18- return ;
19- }
20- a1 [ 0 ] = ( a1 [ 0 ] ? new Date ( a1 [ 0 ] . getFullYear ( ) , a1 [ 0 ] . getMonth ( ) , a1 [ 0 ] . getDate ( ) ) : '' ) ;
21- a1 [ 1 ] = ( a1 [ 1 ] ? new Date ( a1 [ 1 ] . getFullYear ( ) , a1 [ 1 ] . getMonth ( ) , a1 [ 1 ] . getDate ( ) ) : '' ) ;
22- a2 [ 0 ] = ( a2 [ 0 ] ? new Date ( a2 [ 0 ] . getFullYear ( ) , a2 [ 0 ] . getMonth ( ) , a2 [ 0 ] . getDate ( ) ) : '' ) ;
23- a2 [ 1 ] = ( a2 [ 1 ] ? new Date ( a2 [ 1 ] . getFullYear ( ) , a2 [ 1 ] . getMonth ( ) , a2 [ 1 ] . getDate ( ) ) : '' ) ;
24- deepEqual ( a1 , a2 , message ) ;
25- }
26-
27- function addMonths ( date , offset ) {
15+ TestHelpers . addMonths = function ( date , offset ) {
2816 var maxDay = 32 - new Date ( date . getFullYear ( ) , date . getMonth ( ) + offset , 32 ) . getDate ( ) ;
2917 date . setDate ( Math . min ( date . getDate ( ) , maxDay ) ) ;
3018 date . setMonth ( date . getMonth ( ) + offset ) ;
3119 return date ;
32- }
20+ } ;
3321
3422function init ( id , options ) {
3523 $ . datepicker . setDefaults ( $ . datepicker . regional [ '' ] ) ;
3624 return $ ( id ) . datepicker ( $ . extend ( { showAnim : '' } , options || { } ) ) ;
3725}
3826
39- var PROP_NAME = 'datepicker' ;
27+ TestHelpers . PROP_NAME = 'datepicker' ;
4028
4129( function ( $ ) {
4230
0 commit comments