UNPKG

316 BJavaScriptView Raw
1export default (function (o, c, d) {
2 var proto = c.prototype;
3
4 proto.dayOfYear = function (input) {
5 // d(this) is for badMutable
6 var dayOfYear = Math.round((d(this).startOf('day') - d(this).startOf('year')) / 864e5) + 1;
7 return input == null ? dayOfYear : this.add(input - dayOfYear, 'day');
8 };
9});
\No newline at end of file