(name, size, offset, trim, negWrap)
| 21603 | |
| 21604 | |
| 21605 | function dateGetter(name, size, offset, trim, negWrap) { |
| 21606 | offset = offset || 0; |
| 21607 | return function(date) { |
| 21608 | var value = date['get' + name](); |
| 21609 | if (offset > 0 || value > -offset) { |
| 21610 | value += offset; |
| 21611 | } |
| 21612 | if (value === 0 && offset === -12) value = 12; |
| 21613 | return padNumber(value, size, trim, negWrap); |
| 21614 | }; |
| 21615 | } |
| 21616 | |
| 21617 | function dateStrGetter(name, shortForm, standAlone) { |
| 21618 | return function(date, formats) { |