(name, size, offset, trim, negWrap)
| 21930 | |
| 21931 | |
| 21932 | function dateGetter(name, size, offset, trim, negWrap) { |
| 21933 | offset = offset || 0; |
| 21934 | return function(date) { |
| 21935 | var value = date['get' + name](); |
| 21936 | if (offset > 0 || value > -offset) { |
| 21937 | value += offset; |
| 21938 | } |
| 21939 | if (value === 0 && offset === -12) value = 12; |
| 21940 | return padNumber(value, size, trim, negWrap); |
| 21941 | }; |
| 21942 | } |
| 21943 | |
| 21944 | function dateStrGetter(name, shortForm, standAlone) { |
| 21945 | return function(date, formats) { |