index.js 316 B

123456789
  1. export default (function (o, c, d) {
  2. var proto = c.prototype;
  3. proto.dayOfYear = function (input) {
  4. // d(this) is for badMutable
  5. var dayOfYear = Math.round((d(this).startOf('day') - d(this).startOf('year')) / 864e5) + 1;
  6. return input == null ? dayOfYear : this.add(input - dayOfYear, 'day');
  7. };
  8. });