Getting started

Create a new NDateTime from a javascript date

var myDate = NDateTimeFromJsObject(new Date());

Create a new NDateTime from specified year, month, day

var myDate = new NDateTime(2013, 01, 13); //January 13, 2013

Create a new NDateTime from specified year, month, day, hour, minute, second

var myDate = new NDateTime(2013, 01, 13, 10, 23, 45); //January 13, 2013 10:23:45

Get the current time

 var mydate = NDateTime.Now();

The Now() method is static so you should call that method directly on the NDateTime class instead of on an instance.

Return a javascript date object from your NDateTime object

 var mydate = new NDateTime(2013, 01, 13).AddDays(7).JavaScriptDateObject;

This can be really useful if you work with plugins that required javascript date object.



NDateTime Structure and examples

NTimeSpan Structure and examples

Last edited Sep 21, 2013 at 11:48 AM by jeremydumais, version 32


jeremydumais Jan 4, 2013 at 8:32 PM 
Thanks for your contribution man!