(name, size, offset, trim, negWrap)
| 20990 | |
| 20991 | |
| 20992 | function dateGetter(name, size, offset, trim, negWrap) { |
| 20993 | offset = offset || 0; |
| 20994 | return function(date) { |
| 20995 | var value = date['get' + name](); |
| 20996 | if (offset > 0 || value > -offset) { |
| 20997 | value += offset; |
| 20998 | } |
| 20999 | if (value === 0 && offset === -12) value = 12; |
| 21000 | return padNumber(value, size, trim, negWrap); |
| 21001 | }; |
| 21002 | } |
| 21003 | |
| 21004 | function dateStrGetter(name, shortForm, standAlone) { |
| 21005 | return function(date, formats) { |