{"author":{"name":"constantology","email":"christos@muigui.com","url":"http://muigui.com"},"description":"d8 is a date parsing and formatting micro-framework for modern JavaScript engines.","dependencies":{"m8":">= 0.1.0"},"devDependencies":{"Templ8":">= 0.3.0","mkdirp":">= 0.3.0","uglify-js":">= 1.2.5"},"keywords":["date"],"licenses":[{"type":"MIT","url":"https://raw.github.com/constantology/d8/master/LICENSE"}],"main":"./d8.js","name":"d8","repository":{"type":"git","url":"git@github.com:constantology/d8.git"},"version":"0.3.0","_npmUser":{"name":"constantology","email":"constantology@gmail.com"},"_id":"d8@0.3.0","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"288d8a85766b30edf07d2b98f4f308e4ef48f9f8","tarball":"http://registry-npm.ywwl.com/d8/download/d8-0.3.0.tgz","integrity":"sha512-e0waWNTjfmc6DodeDeHcWu9FhRoYD7I8XmNnSH3Su1w/wSO+rXzjiL4nOisLLlEEMYGFHEWJyf/LEtDEg4E4Yw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmHQ3TDPbeGCJpE9iIjBG5rjBGzzQ4k3QuohOpXU7v1AiEApNo1BnX2Vm1SB9VS4tL/BiIEsY27v4TM6wtrkls0EfQ="}],"size":10088,"noattachment":false,"key":"/d8/-/d8-0.3.0.tgz"},"maintainers":[{"name":"constantology","email":"constantology@gmail.com"}],"directories":{},"readme":"# d8.js\n\nd8 is a date parsing and formatting micro-framework for modern JavaScript engines.\n\nd8 uses [Templ8](https://github.com/constantology/Templ8) to output a String representation of a Date, based on [php formatting options](http://php.net/manual/en/function.date.php).\n\nAs d8 extends JavaScript's native `Date` & `Date.prototype` – the CORRECT way – there is no actual global called d8. Instead all static and instance methods are available from the native `Date` & `Date.prototype` respectively.\n\ncurrently the only locales available are:\n\n- en-GB\n- en-US\n\nbut feel free to create a locale for your specific nationality and submit a pull request! :D\n\n## WARNING!\n\nThis is an, as yet, untested and incompletely documented framework. Use at your own risk.\n\n## browser usage\n\n```html\n\n<!-- IMPORTANT: Templ8 must be loaded before d8 -->\n   <script src=\"/path/to/Templ8/Templ8.client.min.js\" type=\"text/javascript\"></script>\n<!-- IMPORTANT: The correct locale must ALSO be loaded before d8! -->\n   <script src=\"/path/to/d8/locale/en-GB.js\" type=\"text/javascript\"></script>\n   <script src=\"/path/to/d8/d8.min.js\" type=\"text/javascript\"></script>\n\n```\n\n## nodejs usage\n\n```javascript\n\n   require( 'd8/locale/en-GB.js' ); // IMPORTANT: The correct locale must ALSO be loaded before d8!!\n   require( 'd8' );\n\n```\n\nAs mentioned above d8 extends JavaScript's native `Date` & `Date.prototype`, so when requiring d8, you don't need to assign it to a variable to use d8's features.\n\n## API\n\n### Static methods\n\n#### isLeapYear( year:String ):Boolean\n#### setLeapYear( date:Date ):Void\n#### toDate( date:String, format:String ):Date\n\n### Static properties\n\n#### filters\nAn Object of all the available filters for formatting a Date.\n\n#### formats\nAn Object containing some default date formats:\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">ISO_8601</td><td>Y-m-d<T>H:i:sP</td>\n\t<tr><td width=\"32\">ISO_8601_SHORT</td><td>Y-m-d</td>\n\t<tr><td width=\"32\">RFC_850</td><td>l, d-M-y H:i:s T</td>\n\t<tr><td width=\"32\">RFC_2822</td><td>D, d M Y H:i:s O</td>\n\t<tr><td width=\"32\">sortable</td><td>Y-m-d H:i:sO</td>\n</table>\n\n### Instance methods\n\n#### GMTOffset( colon:Boolean ):String\n#### ISODay():Number\n#### ISODaysInYear():Number\n#### ISOFirstMondayOfYear():Date\n#### ISOWeek():Number\n#### ISOWeeksInYear():Number\n#### adjust( interval:Object|String, value:Number ):Date\n#### between( date_lower:Date, date_higher:Date ):Boolean\n#### clearTime():Date\n#### clone():Date\n#### dayOfYear():Number\n#### firstOfTheMonth():Date\n#### format( format:String ):String\n#### isDST():Boolean\n#### isLeapYear():Boolean\n#### lastOfTheMonth():Date\n#### timezone():String\n\n## Date formatting and parsing options\n\n### day\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">d</td><td>Day of the month, 2 digits with leading zeros</td>\n\t<tr><td width=\"32\">D</td><td>A textual representation of a day, three letters</td>\n\t<tr><td width=\"32\">j</td><td>Day of the month without leading zeros</td>\n\t<tr><td width=\"32\">l</td><td>A full textual representation of the day of the week</td>\n\t<tr><td width=\"32\">N</td><td>ISO-8601 numeric representation of the day of the week</td>\n\t<tr><td width=\"32\">S</td><td>English ordinal suffix for the day of the month, 2 characters</td>\n\t<tr><td width=\"32\">w</td><td>Numeric representation of the day of the week</td>\n\t<tr><td width=\"32\">z</td><td>The day of the year (starting from 0)</td>\n</table>\n### week\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">W</td><td>ISO-8601 week number of year, weeks starting on Monday</td>\n</table>\n### month\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">F</td><td>A full textual representation of a month</td>\n\t<tr><td width=\"32\">m</td><td>Numeric representation of a month, with leading zeros</td>\n\t<tr><td width=\"32\">M</td><td>A short textual representation of a month, three letters</td>\n\t<tr><td width=\"32\">n</td><td>Numeric representation of a month, without leading zeros</td>\n\t<tr><td width=\"32\">t</td><td>Number of days in the given month</td>\n</table>\n### year\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">L</td><td>Whether it's a leap year</td>\n\t<tr><td width=\"32\">o</td><td>ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead.</td>\n\t<tr><td width=\"32\">Y</td><td>A full numeric representation of a year, 4 digits</td>\n\t<tr><td width=\"32\">y</td><td>A two digit representation of a year</td>\n</table>\n### time\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">a</td><td>Lowercase Ante meridiem and Post meridiem</td>\n\t<tr><td width=\"32\">A</td><td>Uppercase Ante meridiem and Post meridiem</td>\n\t<tr><td width=\"32\">g</td><td>12-hour format of an hour without leading zeros</td>\n\t<tr><td width=\"32\">G</td><td>24-hour format of an hour without leading zeros</td>\n\t<tr><td width=\"32\">h</td><td>12-hour format of an hour with leading zeros</td>\n\t<tr><td width=\"32\">H</td><td>24-hour format of an hour with leading zeros</td>\n\t<tr><td width=\"32\">i</td><td>Minutes with leading zeros</td>\n\t<tr><td width=\"32\">s</td><td>Seconds, with leading zeros</td>\n\t<tr><td width=\"32\">u</td><td>Milliseconds</td>\n</table>\n### timezone\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">O</td><td>Difference to Greenwich time (GMT) in hours</td>\n\t<tr><td width=\"32\">P</td><td>Difference to Greenwich time (GMT) with colon between hours and minutes</td>\n\t<tr><td width=\"32\">T</td><td>Timezone abbreviation</td>\n\t<tr><td width=\"32\">Z</td><td>Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive.</td>\n</table>\n### full date/time\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t<tr><td width=\"32\">c</td><td>ISO 8601 date</td>\n\t<tr><td width=\"32\">r</td><td>RFC 2822 formatted date</td>\n\t<tr><td width=\"32\">U</td><td>Seconds since the Unix Epoch January 1 1970 00:00:00 GMT</td>\n</table>\n","publish_time":1341079900136,"_cnpm_publish_time":1341079900136,"dist-tags":{"latest":"0.4.4"}}