(name, size, offset, trim, negWrap)
| 22041 | |
| 22042 | |
| 22043 | function dateGetter(name, size, offset, trim, negWrap) { |
| 22044 | offset = offset || 0; |
| 22045 | return function(date) { |
| 22046 | var value = date['get' + name](); |
| 22047 | if (offset > 0 || value > -offset) { |
| 22048 | value += offset; |
| 22049 | } |
| 22050 | if (value === 0 && offset === -12) value = 12; |
| 22051 | return padNumber(value, size, trim, negWrap); |
| 22052 | }; |
| 22053 | } |
| 22054 | |
| 22055 | function dateStrGetter(name, shortForm, standAlone) { |
| 22056 | return function(date, formats) { |