title: Usage Examples of DateJS in NodeJS
body: <p>I have installed DateJS in my NodeJS project for easy handling of adding months. I added it in my package.json.</p>
  
  <pre><code> "datejs": "*"
  </code></pre>
  
  <p>Then installed it via :</p>
  
  <pre><code>root@v-hj-0190:~/deepak/appJade# npm -d install
  npm info it worked if it ends with ok
  npm info using npm@1.4.28
  npm info using node@v0.10.33
  npm info preinstall appJade@0.0.0
  npm info trying registry request attempt 1 at 15:08:34
  npm http GET https://registry.npmjs.org/datejs
  npm http 304 https://registry.npmjs.org/datejs
  npm info install datejs@1.0.0-rc3 into /root/deepak/appJade
  npm info installOne datejs@1.0.0-rc3
  npm info preinstall datejs@1.0.0-rc3
  npm info build /root/deepak/appJade/node_modules/datejs
  npm info linkStuff datejs@1.0.0-rc3
  npm info install datejs@1.0.0-rc3
  npm info postinstall datejs@1.0.0-rc3
  npm info build /root/deepak/appJade
  npm info linkStuff appJade@0.0.0
  npm info install appJade@0.0.0
  npm info postinstall appJade@0.0.0
  npm info prepublish appJade@0.0.0
  datejs@1.0.0-rc3 node_modules/datejs
  npm info ok
  root@v-hj-0190:~/deepak/appJade#  
  </code></pre>
  
  <p>I have added the require line in app.js </p>
  
  <pre><code>...
  var bodyParser = require('body-parser');
  var Date = require('datejs');
  ...
  </code></pre>
  
  <p>But the following codes are still giving error:</p>
  
  <pre><code>var approvalDate =  Date.today();
                                   ^
  TypeError: Object function Date() { [native code] } has no method 'today'
  ..
  
  
  var n = 6;
  console.log(n.months().fromNow());
                        ^
  TypeError: Object 6 has no method 'months'
  </code></pre>
  
  <p>Note: I am new to NodeJS and need examples of how to integrate/use DateJS in a project.Only direct functions have been provided everywhere.  </p>