schangxiang@126.com
2025-09-19 0821aa23eabe557c0d9ef5dbe6989c68be35d1fe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
 
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Date-Utils Index</title>
 
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
 
    <link type="text/css" rel="stylesheet" href="styles/site.journal.css">
 
</head>
 
<body>
<div class="container-fluid">
    <div class="navbar navbar-fixed-top navbar-inverse">
        <div class="navbar-inner">
            <a class="brand" href="index.html">Date-Utils</a>
            <ul class="nav">
                
                <li class="dropdown">
                    <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
                        class="caret"></b></a>
 
                    <ul class="dropdown-menu ">
                        
                        <li>
                            <a href="Date.html">Date</a>
                        </li>
                        
 
                    </ul>
                </li>
                
            </ul>
        </div>
    </div>
 
    <div class="row-fluid">
 
        
        <div class="span8">
            
                <div id="main">
                    
 
 
    
    <span class="page-title">Index</span>
    
    
 
 
 
 
 
 
 
 
 
 
 
 
    
    
 
 
 
 
 
    <section class="readme-section">
        <article><h1>Date-Utils: Polyfills for the Date object</h1><p><a href="http://travis-ci.org/JerrySievert/date-utils"><img src="https://secure.travis-ci.org/JerrySievert/date-utils.png" alt="Build Status"></a></p>
<h2>NOTE</h2><p>Version 2 Feature and Changes discussion is being held at https://github.com/JerrySievert/node-date-utils/issues/37</p>
<h2>In a nutshell</h2><ul>
<li>Micro-Framework adding missing functionality to the Date object</li>
<li>Useable as a polyfill in the browser</li>
<li>Useable as a polyfill in Node.js</li>
<li>Works in CouchDB</li>
</ul>
<h2>Using within a Browser</h2><pre class="prettyprint source"><code>&lt;script type=&quot;text/javascript&quot; src=&quot;date-utils.min.js&quot;>&lt;/script></code></pre><h2>Using with Node.js</h2><pre class="prettyprint source"><code>$ npm install date-utils
 
require('date-utils');</code></pre><p>Note: This did not work in the <code>REPL</code> before <code>Node.js 0.6</code> due to how <code>Node.js</code> handles context in the <code>REPL</code>.</p>
<h2>Changing Languages</h2><pre class="prettyprint source"><code>require('date-utils').language(&quot;es&quot;)</code></pre><p>Supported languages:</p>
<ul>
<li>Spanish - &quot;es&quot;</li>
<li>French - &quot;fr&quot;</li>
<li>Portuguese Brazilian - &quot;pt-BR&quot;</li>
</ul>
<h2>Documentation</h2><p>Documentation (nearing completion) can be found at https://jerrysievert.github.io/date-utils</p>
<h2>Development</h2><p>Make sure you have <a href="https://www.npmjs.org/package/gulp">gulp</a> installed (npm install gulp -g). After that hit <code>npm install</code> to get the dependencies. Finally, hit <code>gulp</code>. This will build the library initially. If you make changes to the library, it will compile the minified version automatically.</p>
<h3>Testing</h3><pre class="prettyprint source"><code>$ npm test</code></pre><h3>Complexity and Minification</h3><pre class="prettyprint source"><code>$ gulp</code></pre></article>
    </section>
 
 
 
 
 
 
 
                </div>
 
                <div class="clearfix"></div>
                <footer>
                    
                    
        <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
        on 2016-04-18T20:32:20-07:00 using the <a
            href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
        </span>
                </footer>
            </div>
 
            
            <div class="span3">
                <div id="toc"></div>
            </div>
            
            <br clear="both">
        </div>
 
    </div>
    <!--<script src="scripts/sunlight.js"></script>-->
    <script src="scripts/docstrap.lib.js"></script>
    <script src="scripts/bootstrap-dropdown.js"></script>
    <script src="scripts/toc.js"></script>
 
    <script>
        $( function () {
            $( "[id*='$']" ).each( function () {
                var $this = $( this );
 
                $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
            } );
 
            $( "#toc" ).toc( {
                anchorName  : function ( i, heading, prefix ) {
                    return $( heading ).attr( "id" ) || ( prefix + i );
                },
                selectors   : "h1,h2,h3,h4",
                showAndHide : false,
                scrollTo    : "100px"
            } );
 
            $( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
            $( "#main span[id^='toc']" ).addClass( "toc-shim" );
            $( '.dropdown-toggle' ).dropdown();
//            $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" );
 
            $( ".tutorial-section pre, .readme-section pre" ).each( function () {
                var $this = $( this );
 
                var example = $this.find( "code" );
                exampleText = example.html();
                var lang = /{@lang (.*?)}/.exec( exampleText );
                if ( lang && lang[1] ) {
                    exampleText = exampleText.replace( lang[0], "" );
                    example.html( exampleText );
                    lang = lang[1];
                } else {
                    lang = "javascript";
                }
 
                if ( lang ) {
 
                    $this
                        .addClass( "sunlight-highlight-" + lang )
                        .addClass( "linenums" )
                        .html( example.html() );
 
                }
            } );
 
            Sunlight.highlightAll( {
                lineNumbers : true,
                showMenu : true,
                enableDoclinks : true
            } );
        } );
     </script>
 
 
 
    <!--Navigation and Symbol Display-->
    
 
 
    <!--Google Analytics-->
    
 
</body>
</html>