{"name":"gregorian-calendar","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"},"testling":{"server":"server.js","html":"tests/runner.html","browsers":["ie/6..latest","chrome/latest","firefox/latest","safari/latest","iphone/6..lastest","ipad/6..latest","android-browser/latest"]},"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":8011},"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"},"gitHead":"9656354a0284632da6dbcbbd599af939917008ac","description":"gregorian calendar lib on browser and nodejs","bugs":{"url":"https://github.com/kissyteam/gregorian-calendar/issues"},"homepage":"https://github.com/kissyteam/gregorian-calendar","_id":"gregorian-calendar@2.0.2","_shasum":"d9bef3fac37678d76be63568ae426fbccac29cfc","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"yiminghe","email":"yiminghe@gmail.com"},"maintainers":[{"name":"yiminghe","email":"yiminghe@gmail.com"}],"dist":{"shasum":"d9bef3fac37678d76be63568ae426fbccac29cfc","tarball":"http://registry-npm.ywwl.com/gregorian-calendar/download/gregorian-calendar-2.0.2.tgz","integrity":"sha512-iH3C6x6orDdFnxHNmQJMiGAcqk3hSwSc8DMyPHRhPVHtsziRlc43NfIBpFJRhvBUa5/mS3SE2nhVLRltV5M8LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7lWllq/uPkAwAQdaPDqF4bCziJhI4yEF1C41zJbs8MQIhAPu/OYivMPWipGhh8GZeuJb0QRFiZAY9i1ujAhSVM6JG"}],"size":15739,"noattachment":false,"key":"/gregorian-calendar/-/gregorian-calendar-2.0.2.tgz"},"directories":{},"readme":"# gregorian-calendar\n\ngregorian calendar lib for browser and nodejs. ported from JAVA.\n\n[![date](https://nodei.co/npm/gregorian-calendar.png)](https://npmjs.org/package/gregorian-calendar)\n[![NPM downloads](http://img.shields.io/npm/dm/gregorian-calendar.svg)](https://npmjs.org/package/gregorian-calendar)\n[![Build Status](https://secure.travis-ci.org/yiminghe/gregorian-calendar.png?branch=master)](https://travis-ci.org/yiminghe/gregorian-calendar)\n[![Coverage Status](https://img.shields.io/coveralls/yiminghe/gregorian-calendar.svg)](https://coveralls.io/r/yiminghe/gregorian-calendar?branch=master)\n[![Dependency Status](https://gemnasium.com/yiminghe/gregorian-calendar.png)](https://gemnasium.com/yiminghe/gregorian-calendar)\n[![node version](https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square)](http://nodejs.org/download/)\n\n[![Sauce Test Status](https://saucelabs.com/buildstatus/gregorian-calendar)](https://saucelabs.com/u/gregorian-calendar)\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/gregorian-calendar.svg)](https://saucelabs.com/u/gregorian-calendar)\n\n## use on node\n\n```javascript\nvar GregorianCalendar = require('gregorian-calendar');\nvar date = new GregorianCalendar(require('gregorian-calendar/lib/locale/zh_CN')); // defaults to en_US\ndate.setTime(+new Date());\nconsole.log(date.getDayOfWeek());\n```\n\n## API\n\n### Constructor GregorianCalendar(locale)\n\n* locale: specify suc as timeZoneOffset, firstDayOfWeek, can be require('gregorian-calendar/lib/locale/zh_CN') or \nrequire('gregorian-calendar/lib/locale/en_US')\n\n\n### Enums\n\n```js\n  SUNDAY: 0,\n  /**\n   * Enum indicating monday\n   * @type Number\n   * @member Date.Gregorian\n   */\n  MONDAY: 1,\n  /**\n   * Enum indicating tuesday\n   * @type Number\n   * @member Date.Gregorian\n   */\n  TUESDAY: 2,\n  /**\n   * Enum indicating wednesday\n   * @type Number\n   * @member Date.Gregorian\n   */\n  WEDNESDAY: 3,\n  /**\n   * Enum indicating thursday\n   * @type Number\n   * @member Date.Gregorian\n   */\n  THURSDAY: 4,\n  /**\n   * Enum indicating friday\n   * @type Number\n   * @member Date.Gregorian\n   */\n  FRIDAY: 5,\n  /**\n   * Enum indicating saturday\n   * @type Number\n   * @member Date.Gregorian\n   */\n  SATURDAY: 6,\n  /**\n   * Enum indicating january\n   * @type Number\n   * @member Date.Gregorian\n   */\n  JANUARY: 0,\n  /**\n   * Enum indicating february\n   * @type Number\n   * @member Date.Gregorian\n   */\n  FEBRUARY: 1,\n  /**\n   * Enum indicating march\n   * @type Number\n   * @member Date.Gregorian\n   */\n  MARCH: 2,\n  /**\n   * Enum indicating april\n   * @type Number\n   * @member Date.Gregorian\n   */\n  APRIL: 3,\n  /**\n   * Enum indicating may\n   * @type Number\n   * @member Date.Gregorian\n   */\n  MAY: 4,\n  /**\n   * Enum indicating june\n   * @type Number\n   * @member Date.Gregorian\n   */\n  JUNE: 5,\n  /**\n   * Enum indicating july\n   * @type Number\n   * @member Date.Gregorian\n   */\n  JULY: 6,\n  /**\n   * Enum indicating august\n   * @type Number\n   * @member Date.Gregorian\n   */\n  AUGUST: 7,\n  /**\n   * Enum indicating september\n   * @type Number\n   * @member Date.Gregorian\n   */\n  SEPTEMBER: 8,\n  /**\n   * Enum indicating october\n   * @type Number\n   * @member Date.Gregorian\n   */\n  OCTOBER: 9,\n  /**\n   * Enum indicating november\n   * @type Number\n   * @member Date.Gregorian\n   */\n  NOVEMBER: 10,\n  /**\n   * Enum indicating december\n   * @type Number\n   * @member Date.Gregorian\n   */\n  DECEMBER: 11\n```\n\n### GregorianCalendar.prototype.set(year, month, dayOfMonth, hourOfDay, minutes, seconds, milliseconds)\n\nsame as call setYear, setMonth, setDayOfMonth ....\n\n### GregorianCalendar.prototype.setTime(time: Number)\n\nset absolute time for current instance\n\n### Number GregorianCalendar.prototype.getTime()\n\nget absolute time for current instance\n\n### GregorianCalendar.prototype.setTimezoneOffset(timezoneOffset: Number)\n\nset current date instance's timezone offset (in minutes)\n\n### Number GregorianCalendar.prototype.getTimezoneOffset()\n\nget current date instance's timezone offset (in minutes)\n\n### GregorianCalendar.prototype.setYear(year: Number)\n\nset the year of the given calendar field.\n\n### Number GregorianCalendar.prototype.getYear()\n\nReturns the year of the given calendar field.\n\n### GregorianCalendar.prototype.setMonth(month: Number)\n\nset the month of the given calendar field. January is 0, you can use enum\n\n### GregorianCalendar.prototype.rollSetMonth(month: Number)\n\nset the month of the given calendar field without influence month.\n\n```js\n2015-09-29 -> setMonth(2) -> 2015-03-01\n2015-09-29 -> rollSetMonth(2) -> 2015-02-28\n```\n\n### Number GregorianCalendar.prototype.getMonth()\n\nReturns the month of the given calendar field.\n\n### GregorianCalendar.prototype.setDayOfMonth(day: Number)\n\nset the day of month of the given calendar field.\n\n### Number GregorianCalendar.prototype.getDayOfMonth()\n\nReturns the day of month of the given calendar field.\n\n### GregorianCalendar.prototype.setHourOfDay(hour: Number)\n\nset the hour of day for the given calendar field.\n\n### Number GregorianCalendar.prototype.getHourOfDay()\n\nReturns the hour of day for the given calendar field.\n\n### GregorianCalendar.prototype.setMinutes(minute: Number)\n\nset the minute of the given calendar field.\n\n### Number GregorianCalendar.prototype.getMinutes()\n\nReturns the minute of the given calendar field.\n\n### GregorianCalendar.prototype.setSeconds(second: Number)\n\nset the second of the given calendar field.\n\n### Number GregorianCalendar.prototype.getSeconds()\n\nReturns the second of the given calendar field.\n\n### GregorianCalendar.prototype.setMilliSeconds(second: Number)\n\nset the millisecond of the given calendar field.\n\n### Number GregorianCalendar.prototype.getMilliSeconds()\n\nReturns the millisecond of the given calendar field.\n\n### Number GregorianCalendar.prototype.getWeekOfYear()\n\nReturns the week of year of the given calendar field.\n\n### Number GregorianCalendar.prototype.getWeekOfMonth()\n\nReturns the week of month of the given calendar field.\n\n### Number GregorianCalendar.prototype.getDayOfYear()\n\nReturns the day of year of the given calendar field.\n\n### Number GregorianCalendar.prototype.getDayOfWeek()\n\nReturns the day of week of the given calendar field. sunday is 0, monday is 1\n\n### Number GregorianCalendar.prototype.getDayOfWeekInMonth()\n\nReturns the day of week in month of the given calendar field.\n\n### GregorianCalendar.prototype.addYear(amount: Number)\n\nadd the year of the given calendar field.\n\n### GregorianCalendar.prototype.addMonth(amount: Number)\n\nadd the month of the given calendar field.\n\n### GregorianCalendar.prototype.addDayOfMonth(amount: Number)\n\nadd the day of month of the given calendar field.\n\n### GregorianCalendar.prototype.addHourOfDay(amount: Number)\n\nadd the hour of day of the given calendar field.\n\n### GregorianCalendar.prototype.addMinute(amount: Number)\n\nadd the minute of the given calendar field.\n\n### GregorianCalendar.prototype.addSecond(amount: Number)\n\nadd the second of the given calendar field.\n\n### GregorianCalendar.prototype.addMilliSecond(amount: Number)\n\nadd the millisecond of the given calendar field.\n\n### Number GregorianCalendar.prototype.getWeekYear()\n\nReturns the week number of year represented by this GregorianCalendar.\n\n### GregorianCalendar.prototype.setWeekDate(weekYear: Number, weekOfYear: Number, dayOfWeek: Number)\n\nSets this GregorianCalendar to the date given by the date specifiers - weekYear,\nweekOfYear, and dayOfWeek. weekOfYear follows the WEEK_OF_YEAR numbering.\nThe dayOfWeek value must be one of the DAY_OF_WEEK values: SUNDAY to SATURDAY.\n\n* weekYear:   the week year\n* weekOfYear: the week number based on weekYear\n* dayOfWeek:  the day of week value\n\n### Number GregorianCalendar.prototype.getWeeksInWeekYear()\n\nReturns the number of weeks in the week year\n\n### GregorianCalendar GregorianCalendar.prototype.clone()\n\nReturns a clone of current instance\n\n### boolean GregorianCalendar.prototype.equals(other: GregorianCalendar)\n\n\n### Number GregorianCalendar.prototype.compareToDay(other: GregorianCalendar)\n\ncompare this object and other by day. return -1 0 or 1\n\n### GregorianCalendar.prototype.clear()\n\nclear all field of current instance\n\n\n## License\n\ngregorian-calendar is released under the MIT license.\n","publish_time":1418192814814,"_cnpm_publish_time":1418192814814,"dist-tags":{"latest":"4.1.6"}}