3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>The source code</title>
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <body onload="prettyPrint();">
9 <pre class="prettyprint lang-js">/*!
10 * Ext JS Library 3.3.1
11 * Copyright(c) 2006-2010 Sencha Inc.
12 * licensing@sencha.com
13 * http://www.sencha.com/license
15 Ext.ns('Ext.calendar');
18 Ext.apply(Ext.calendar, {
20 diffDays: function(start, end) {
21 day = 1000 * 60 * 60 * 24;
22 diff = end.clearTime(true).getTime() - start.clearTime(true).getTime();
23 return Math.ceil(diff / day);
26 copyTime: function(fromDt, toDt) {
27 var dt = toDt.clone();
32 fromDt.getMilliseconds());
37 compare: function(dt1, dt2, precise) {
38 if (precise !== true) {
40 dt1.setMilliseconds(0);
42 dt2.setMilliseconds(0);
44 return dt2.getTime() - dt1.getTime();
48 maxOrMin: function(max) {
49 var dt = (max ? 0: Number.MAX_VALUE),
54 dt = Math[max ? 'max': 'min'](dt, args[i].getTime());
60 return this.maxOrMin.apply(this, [true, arguments]);
64 return this.maxOrMin.apply(this, [false, arguments]);