date-type
The date type.
Usage
//register the date type to the TypeInfo..var TypeInfo = //get the date type info:var DateType = /*//Just load date type only:var DateTypeInfo = require('date-type')var DateType = DateTypeInfo('date') */ var today = DateType//var today = DateType.create(new Date()).clearTime() //it's the same.//var today = DateType.create(Date.now()).clearTime() //it's the same. var nextDay = todayaddDays 1var FutureType = console//<type "Date": "value":"2016-02-28T04:13:46.352Z">console//=trueconsole)//='"2016-02-28T04:13:46.352Z"'console)//='{"value":"2016-02-28T04:13:46.352Z","name":"Date"}'console//=trueconsole//=truevar n = nextDay;n//=TypeError: "aaa" is an invalid Dateconsole//=true
API
See abstract-type
TODO
License
MIT