{"name":"gregorian-calendar","version":"3.2.2","author":{"name":"yiminghe","email":"yiminghe@gmail.com"},"description":"date time utils ported from java","keywords":["date","time"],"engines":{"node":">=0.10"},"files":["lib"],"main":"lib/gregorian-calendar","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/yiminghe/gregorian-calendar.git"},"devDependencies":{"expect.js":"^0.3.1","precommit-hook":"^1.0.7","rc-server":"3.x","rc-tools":"4.x"},"precommit":["lint"],"config":{"port":8011},"scripts":{"build":"rc-tools run build","gh-pages":"rc-tools run gh-pages","start":"node --harmony node_modules/.bin/rc-server","pub":"rc-tools run pub","lint":"rc-tools run lint","karma":"rc-tools run karma","saucelabs":"node --harmony node_modules/.bin/rc-tools run saucelabs","browser-test":"node --harmony node_modules/.bin/rc-tools run browser-test","browser-test-cover":"node --harmony node_modules/.bin/rc-tools run browser-test-cover"},"gitHead":"6f05c3925ad0c29d6a4e8ddec991cdfe404faf4f","bugs":{"url":"https://github.com/yiminghe/gregorian-calendar/issues"},"homepage":"https://github.com/yiminghe/gregorian-calendar#readme","_id":"gregorian-calendar@3.2.2","_shasum":"f11905b73bfc70d28112934a7c8aff1eb214a761","_from":".","_npmVersion":"2.14.8","_nodeVersion":"4.0.0","_npmUser":{"name":"yiminghe","email":"yiminghe@gmail.com"},"maintainers":[{"name":"yiminghe","email":"yiminghe@gmail.com"}],"dist":{"shasum":"f11905b73bfc70d28112934a7c8aff1eb214a761","tarball":"http://registry-npm.ywwl.com/gregorian-calendar/download/gregorian-calendar-3.2.2.tgz","integrity":"sha512-y94MUZ+BpzkVMinGSR8ZuaOpgp01f4TtgQbakoSHINWN0HgCsyhngxTataKEL3SRiFgslUNqbFgXhdvepWo6oA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHcjSFJCwwWOE0M1wxEGZdQQpELeX7B+y/yHui+lBmHBAiEAmbwZw1BDSQM8PBCnq+Q+CDJ35C8mphT+Qd7AnDY/5Oc="}],"size":11624,"noattachment":false,"key":"/gregorian-calendar/-/gregorian-calendar-3.2.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":1446465614101,"_cnpm_publish_time":1446465614101,"dist-tags":{"latest":"4.1.6"}}