{"name":"gregorian-calendar-format","version":"2.0.2","author":{"name":"yiminghe","email":"yiminghe@gmail.com"},"engines":{"node":"~0.11"},"license":"MIT","repository":{"type":"git","url":"http://github.com/kissyteam/gregorian-calendar-format"},"devDependencies":{"aggregate-bower":"^1.0.2","async":"^0.9.0","auto-deps":"^1.0.3","expect.js":"^0.3.1","gulp":"^3.8.7","gulp-clean":"^0.3.1","gulp-filter":"^1.0.0","gulp-footer":"^1.0.5","gulp-header":"^1.0.5","gulp-jscs":"^1.1.0","gulp-jshint":"^1.8.4","gulp-kclean":"~0.0.15","gulp-modulex":"^1.0.0","gulp-rename":"^1.2.0","gulp-replace":"^0.4.0","gulp-uglify":"^0.3.1","gulp-util":"^3.0.0","gulp-wrapper":"^0.1.5","jshint":"^2.5.5","jshint-stylish":"^0.4.0","koa":"^0.11.0","koa-body":"^0.2.0","koa-modularize":"^3.0.3","koa-mount":"^1.3.0","koa-node-jscover":"^1.1.1","koa-serve-index":"^1.0.1","koa-static":"^1.4.7","mocha":"^1.21.4","modulex":"^1.7.4","node-jscover":"^0.6.8","node-jscover-coveralls":"^1.0.10","node-jscover-handler":"^1.0.3","precommit-hook":"^1.0.7","through2":"^0.6.2"},"precommit":["lint"],"config":{"port":8012},"scripts":{"start":"node --harmony server","test":"","publish":"gulp tag","lint":"gulp lint","browser-test":"mocha-phantomjs http://localhost:$npm_package_config_port/tests/browser/runner.html","browser-test-cover":"mocha-phantomjs -R node_modules/node-jscover/lib/reporters/mocha/console http://localhost:$npm_package_config_port/tests/browser/runner.html?coverage"},"dependencies":{"gregorian-calendar":"^2.0.2"},"gitHead":"3613af29fcd2cef2de93ac85e10c6d70bb6dd366","description":"format [gregorian-calendar](https://github.com/kissyteam/gregorian-calendar) instance","bugs":{"url":"https://github.com/kissyteam/gregorian-calendar-format/issues"},"homepage":"https://github.com/kissyteam/gregorian-calendar-format","_id":"gregorian-calendar-format@2.0.2","_shasum":"e272a432f6aff869c83d2b3166a0a0b39299b0e1","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"yiminghe","email":"yiminghe@gmail.com"},"maintainers":[{"name":"yiminghe","email":"yiminghe@gmail.com"}],"dist":{"shasum":"e272a432f6aff869c83d2b3166a0a0b39299b0e1","tarball":"http://registry-npm.ywwl.com/gregorian-calendar-format/download/gregorian-calendar-format-2.0.2.tgz","integrity":"sha512-O2Qe9WmMGhzvYRcDtTZw8k6WeAWs265pt5B9IOciFXdMN5xlTctT1nIqFeUfo5LZWf67tfvlKpKMU6GF2WFz/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBn7Am585Od1JcIbtgIRHF8SoFI71B4gw2yF1RTmnovvAiEAvrTeFnVCwetNb5ofVzJi5Fq1umJj28z8HDCuTQULOA4="}],"size":9120,"noattachment":false,"key":"/gregorian-calendar-format/-/gregorian-calendar-format-2.0.2.tgz"},"directories":{},"readme":"# gregorian-calendar-format\n---\n\nformat [gregorian-calendar](https://github.com/yiminghe/gregorian-calendar) instance\n\n[![gregorian-calendar-format](https://nodei.co/npm/gregorian-calendar-format.png)](https://npmjs.org/package/gregorian-calendar-format)\n[![NPM downloads](http://img.shields.io/npm/dm/gregorian-calendar-format.svg)](https://npmjs.org/package/gregorian-calendar-format)\n[![Build Status](https://secure.travis-ci.org/yiminghe/gregorian-calendar-format.png?branch=master)](https://travis-ci.org/yiminghe/gregorian-calendar-format)\n[![Coverage Status](https://img.shields.io/coveralls/yiminghe/gregorian-calendar-format.svg)](https://coveralls.io/r/yiminghe/gregorian-calendar-format?branch=master)\n[![Dependency Status](https://gemnasium.com/yiminghe/gregorian-calendar-format.png)](https://gemnasium.com/yiminghe/gregorian-calendar-format)\n[![node version](https://img.shields.io/badge/node.js-%3E=_0.11-green.svg?style=flat-square)](http://nodejs.org/download/)\n\n\n## use on node\n\n```js\nvar GregorianCalendarFormat = require('gregorian-calendar-format');\nvar GregorianCalendar = require('gregorian-calendar');\nvar gregorianCalendar = new GregorianCalendar();\ngregorianCalendar.set(2013, GregorianCalendar.JULY, 9);\nvar df = new GregorianCalendarFormat('yyyy-MM-dd');\nconsole.log(df.format(gregorianCalendar));\ndf = new GregorianCalendarFormat('yy-MM-dd');\nconsole.log(df.format(gregorianCalendar));\n```\n\n## API\n\n### Constructor GregorianCalendarFormat(pattern: String, locale: Object)\n\n* pattern: pattern string used to format or parse\n\n<table border=\"1\">\n    <thead valign=\"bottom\">\n        <tr>\n            <th class=\"head\">Letter</th>\n            <th class=\"head\">Date or Time Component</th>\n            <th class=\"head\">Presentation</th>\n            <th class=\"head\">Examples</th>\n        </tr>\n    </thead>\n    <tbody valign=\"top\">\n        <tr>\n            <td>G</td>\n            <td>Era designator</td>\n            <td>Text</td>\n            <td>AD</td>\n        </tr>\n        <tr>\n            <td>y</td>\n            <td>Year</td>\n            <td>Year</td>\n            <td>1996; 96</td>\n        </tr>\n        <tr>\n            <td>Y</td>\n            <td>WeekYear</td>\n            <td>WeekYear</td>\n            <td>1996; 96</td>\n        </tr>\n        <tr>\n            <td>M</td>\n            <td>Month in year</td>\n            <td>Month</td>\n            <td>number of M matter. such as: MM:01 MMM:Jan MMMM: January</td>\n        </tr>\n        <tr>\n            <td>w</td>\n            <td>Week in year</td>\n            <td>Number</td>\n            <td>27</td>\n        </tr>\n        <tr>\n            <td>W</td>\n            <td>Week in month</td>\n            <td>Number</td>\n            <td>2</td>\n        </tr>\n        <tr>\n            <td>D</td>\n            <td>Day in year</td>\n            <td>Number</td>\n            <td>189</td>\n        </tr>\n        <tr>\n            <td>d</td>\n            <td>Day in month</td>\n            <td>Number</td>\n            <td>10</td>\n        </tr>\n        <tr>\n            <td>F</td>\n            <td>Day of week in month</td>\n            <td>Number</td>\n            <td>2</td>\n        </tr>\n        <tr>\n            <td>E</td>\n            <td>Day in week</td>\n            <td>Text</td>\n            <td>number of E matter. such as: EEEE: Sunday, EEE: Sun</td>\n        </tr>\n        <tr>\n            <td>a</td>\n            <td>Am/pm marker</td>\n            <td>Text</td>\n            <td>PM</td>\n        </tr>\n        <tr>\n            <td>H</td>\n            <td>Hour in day (0-23)</td>\n            <td>Number</td>\n            <td>0</td>\n        </tr>\n        <tr>\n            <td>k</td>\n            <td>Hour in day (1-24)</td>\n            <td>Number</td>\n            <td>24</td>\n        </tr>\n        <tr>\n            <td>K</td>\n            <td>Hour in am/pm (0-11)</td>\n            <td>Number</td>\n            <td>0</td>\n        </tr>\n        <tr>\n            <td>h</td>\n            <td>Hour in am/pm (1-12)</td>\n            <td>Number</td>\n            <td>12</td>\n        </tr>\n        <tr>\n            <td>m</td>\n            <td>Minute in hour</td>\n            <td>Number</td>\n            <td>30</td>\n        </tr>\n        <tr>\n            <td>s</td>\n            <td>Second in minute</td>\n            <td>Number</td>\n            <td>55</td>\n        </tr>\n        <tr>\n            <td>S</td>\n            <td>Millisecond</td>\n            <td>Number</td>\n            <td>978</td>\n        </tr>\n        <tr>\n            <td>x/z</td>\n            <td>Time zone</td>\n            <td>General time zone</td>\n            <td>Pacific Standard Time; PST; GMT-08:00</td>\n        </tr>\n        <tr>\n            <td>Z</td>\n            <td>Time zone</td>\n            <td>RFC 822 time zone</td>\n            <td>-0800</td>\n        </tr>\n    </tbody>\n</table>\n\nsuch as \"yyyy-MM-dd'日'\" will parse and format \"2013-11-12日\" \"2013-01-02日\". (content inside '' will preserve)\n\n* locale: require('gregorian-calendar-format/locale/en_US') or require('gregorian-calendar-format/locale/zh_CN') specify text when render localize date time string.\n\n#### String GregorianCalendarFormat.prototype.format(calendar: GregorianCalendar)\n\nformat an instance of GregorianCalendar according to pattern\n\n#### GregorianCalendar GregorianCalendarFormat.prototype.parse(dateString: String, {locale: object})\n\nparse a dateString to an instance of GregorianCalendar according to pattern, it's better to specify calendarLocale, such as\n\n```js\ndf.parse('2013-11-12', {locale: require('gregorian-calendar/lib/locale/zh_CN'}));\n```\n\n### GregorianCalendarFormat GregorianCalendarFormat.getDateTimeInstance(dateStyle, timeStyle, locale)\n\nget a predefine GregorianCalendarFormat instance\n\n* dateStyle: enum of predefined date style, enums:\n - en_US:\n   - GregorianCalendarFormat.Style.FULL presents EEEE, MMMM d, yyyy\n   - GregorianCalendarFormat.Style.LONG presents MMMM d, yyyy\n   - GregorianCalendarFormat.Style.MEDIUM presents MMM d, yyyy\n   - GregorianCalendarFormat.Style.SHORT presents M/d/yy\n - zh_CN:\n   - GregorianCalendarFormat.Style.FULL presents \"yyyy'年'M'月'd'日' EEEE\"\n   - GregorianCalendarFormat.Style.LONG presents \"yyyy'年'M'月'd'日'\"\n   - GregorianCalendarFormat.Style.MEDIUM presents \"yyyy-M-d\"\n   - GregorianCalendarFormat.Style.SHORT presents \"yy-M-d\"\n\n* timeStyle: enum of predefined date style, enums:\n - en_US:\n   - GregorianCalendarFormat.Style.FULL presents 'h:mm:ss a \\'GMT\\'Z'\n   - GregorianCalendarFormat.Style.LONG presents 'h:mm:ss a'\n   - GregorianCalendarFormat.Style.MEDIUM presents 'h:mm:ss a'\n   - GregorianCalendarFormat.Style.SHORT presents 'h:mm a'\n - zh_CN:\n   - GregorianCalendarFormat.Style.FULL presents \"ahh'时'mm'分'ss'秒' 'GMT'Z\"\n   - GregorianCalendarFormat.Style.LONG presents \"ahh'时'mm'分'ss'秒'\"\n   - GregorianCalendarFormat.Style.MEDIUM presents \"H:mm:ss\"\n   - GregorianCalendarFormat.Style.SHORT presents \"ah:mm\"\n\n* locale: require('gregorian-calendar-format/locale/en_US') or require('gregorian-calendar-format/locale/zh_CN') specify text when render localize date time string.\n\n\n## License\n\ngregorian-calendar-format is released under the MIT license.","publish_time":1418271945248,"_cnpm_publish_time":1418271945248,"dist-tags":{"latest":"4.1.3"}}