| 
								
							 | 
							
								<html>
							 | 
						
						
						
							| 
								
							 | 
							
								 <head>
							 | 
						
						
						
							| 
								
							 | 
							
								    <title>Datejs Test Cases</title>
							 | 
						
						
						
							| 
								
							 | 
							
								        <!-- Library Support -->
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type="text/javascript" src="scripts/firebug/firebug.js"></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='scripts/jquery-1.2.1.pack.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='scripts/cruiser.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='scripts/enumerable.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='scripts/specifications.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <link rel='stylesheet' type='text/css' href='styles/specifications.css'>
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <!-- Datejs -->    
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='../src/globalization/en-US.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='../src/core.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='../src/sugarpak.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='../src/parser.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='../src/extras.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='../src/time.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <!--<script type='text/javascript' src='../build/date.js'></script>-->
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <!-- Debugging -->
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type='text/javascript' src='scripts/debugging.js'></script>
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <!--<script type='text/javascript' src='scripts/date-functions.js'></script>-->
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <link rel='stylesheet' type='text/css' href='styles/chart.css'>
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <script type="text/javascript">
							 | 
						
						
						
							| 
								
							 | 
							
								//    var benchmark = function( fn ) { 
							 | 
						
						
						
							| 
								
							 | 
							
								//	    var start = new Date(); 
							 | 
						
						
						
							| 
								
							 | 
							
								//	    fn();
							 | 
						
						
						
							| 
								
							 | 
							
								//	    return new Date() - start;
							 | 
						
						
						
							| 
								
							 | 
							
								//    };
							 | 
						
						
						
							| 
								
							 | 
							
								
							 | 
						
						
						
							| 
								
							 | 
							
								//    var micro_benchmark = function( fn ) { 
							 | 
						
						
						
							| 
								
							 | 
							
								//	    var x = 0; for( var i = 0; i < 1000; i++ ) { x+=benchmark(fn); }; return x;
							 | 
						
						
						
							| 
								
							 | 
							
								//    };
							 | 
						
						
						
							| 
								
							 | 
							
								
							 | 
						
						
						
							| 
								
							 | 
							
								//    var dateBenchmark = function( tests, fn ) {
							 | 
						
						
						
							| 
								
							 | 
							
								//	    var month, day, year; var time = 0;
							 | 
						
						
						
							| 
								
							 | 
							
								//	    for ( var i = 0 ; i < tests ; i++ ) {
							 | 
						
						
						
							| 
								
							 | 
							
								//		    month = Math.round( Math.random() * 11 );
							 | 
						
						
						
							| 
								
							 | 
							
								//		    day = Math.round( Math.random() * 27 ) + 1;
							 | 
						
						
						
							| 
								
							 | 
							
								//		    year = Math.round( Math.random() * 10 ) + 1995;
							 | 
						
						
						
							| 
								
							 | 
							
								//        var s = month.toString()+'/'+day.toString()+'/'+year.toString();
							 | 
						
						
						
							| 
								
							 | 
							
								//        time += benchmark( function() { fn(s) } );
							 | 
						
						
						
							| 
								
							 | 
							
								//	    }
							 | 
						
						
						
							| 
								
							 | 
							
								//	    return (Math.round(time/tests*1000));
							 | 
						
						
						
							| 
								
							 | 
							
								//    };
							 | 
						
						
						
							| 
								
							 | 
							
								
							 | 
						
						
						
							| 
								
							 | 
							
								//    $(document).ready(function() {
							 | 
						
						
						
							| 
								
							 | 
							
								//	    var tests = 200;
							 | 
						
						
						
							| 
								
							 | 
							
								//	    var results = {
							 | 
						
						
						
							| 
								
							 | 
							
								//		    'Native: .parse': dateBenchmark( tests, Date._parse ),
							 | 
						
						
						
							| 
								
							 | 
							
								//		    'Ext: .parseDate': dateBenchmark( tests, function(s) { Date.parseDate( s, 'm/d/Y' ); } ),
							 | 
						
						
						
							| 
								
							 | 
							
								//            'Datejs: .parseExact': dateBenchmark( tests, function(s) { Date.parseExact( s, 'M/d/yyyy' ); } ),		
							 | 
						
						
						
							| 
								
							 | 
							
								//		    'Datejs: .getParseFunction': dateBenchmark( tests, Date.getParseFunction('M/d/yyyy')  ),        
							 | 
						
						
						
							| 
								
							 | 
							
								//            'Datejs: .parse': dateBenchmark( tests, Date.parse )
							 | 
						
						
						
							| 
								
							 | 
							
								//	    };
							 | 
						
						
						
							| 
								
							 | 
							
								//	    var max = 0; for ( var k in results ) { max = ( max < results[k] ) ? results[k]:max ; }
							 | 
						
						
						
							| 
								
							 | 
							
								//	    var addResult = function(h, r) { $('#chart').append(
							 | 
						
						
						
							| 
								
							 | 
							
								//		    '<div class="item">' + 
							 | 
						
						
						
							| 
								
							 | 
							
								//			    '<label>' + h + '</label>'+
							 | 
						
						
						
							| 
								
							 | 
							
								//			    '<div class="bar" style="width:' + (r/10) + 'px"></div>' +
							 | 
						
						
						
							| 
								
							 | 
							
								//			    '<div class="display">'+r+' microseconds</div>');
							 | 
						
						
						
							| 
								
							 | 
							
								////			    '<div class="value" style="width:'+(r/max*(1/3)*100)+'%"></div>' +
							 | 
						
						
						
							| 
								
							 | 
							
								//	    };
							 | 
						
						
						
							| 
								
							 | 
							
								//	    for ( var k in results ) { addResult( k, results[k]); }
							 | 
						
						
						
							| 
								
							 | 
							
								//    });
							 | 
						
						
						
							| 
								
							 | 
							
								    </script>
							 | 
						
						
						
							| 
								
							 | 
							
								  </head>
							 | 
						
						
						
							| 
								
							 | 
							
								  
							 | 
						
						
						
							| 
								
							 | 
							
								  <body>
							 | 
						
						
						
							| 
								
							 | 
							
								    <h1>Datejs Test Cases</h1>
							 | 
						
						
						
							| 
								
							 | 
							
								    <ol>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='date/index.html'>Date</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='time/index.html'>Time</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='date_and_time/index.html'>Date and Time</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='partial/index.html'>Partial</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='relative/index.html'>Relative</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='relative_date_and_time/index.html'>Relative Date and Time</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='date_math/index.html'>Date Math</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='parseExact/index.html'>ParseExact</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='core/index.html'>Core Library</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='sugarpak/index.html'>Sugarpak</a></li>	  
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='tostring/index.html'>.toString Function</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='dst/index.html'>Daylight Saving Time</a></li>	  
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='culture_info/index.html'>CulturalInfo (es-MX)</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								    </ol>
							 | 
						
						
						
							| 
								
							 | 
							
								    <h1>Compare to other libraries</h1>
							 | 
						
						
						
							| 
								
							 | 
							
								    <ol>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='rememberthemilk/index.html'>RememberTheMilk.com</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								      <li><a href='ruby_chronic/index.html'>Ruby Chronic</a></li>
							 | 
						
						
						
							| 
								
							 | 
							
								    </ol>    
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								    <!--<p> </p>
							 | 
						
						
						
							| 
								
							 | 
							
									<h1>Parser Performance</h1>
							 | 
						
						
						
							| 
								
							 | 
							
									<div class="information">
							 | 
						
						
						
							| 
								
							 | 
							
									    <p style="margin-top: 0; padding-top: 8px;">The following parsing performance chart creates 200 random date strings in the format of "M/d/yyyy" and parses each string into a <strong>Date</strong> object.</p>
							 | 
						
						
						
							| 
								
							 | 
							
									    <p>The times listed are an average execution time per function call in <strong>microseconds</strong>.</p>
							 | 
						
						
						
							| 
								
							 | 
							
									    <p>One thousand (1000) <strong>microseconds</strong> equals one (1) <strong>millisecond</strong>. A <strong>microsecond</strong> is one millionth of a second.</p>
							 | 
						
						
						
							| 
								
							 | 
							
									</div>
							 | 
						
						
						
							| 
								
							 | 
							
								    <div id='chart'/>-->
							 | 
						
						
						
							| 
								
							 | 
							
								    
							 | 
						
						
						
							| 
								
							 | 
							
								  </body>
							 | 
						
						
						
							| 
								
							 | 
							
								</html>
							 |