(config)
| 17068 | |
| 17069 | // date from iso format or fallback |
| 17070 | function configFromString(config) { |
| 17071 | var matched = aspNetJsonRegex.exec(config._i); |
| 17072 | |
| 17073 | if (matched !== null) { |
| 17074 | config._d = new Date(+matched[1]); |
| 17075 | return; |
| 17076 | } |
| 17077 | |
| 17078 | configFromISO(config); |
| 17079 | if (config._isValid === false) { |
| 17080 | delete config._isValid; |
| 17081 | } else { |
| 17082 | return; |
| 17083 | } |
| 17084 | |
| 17085 | configFromRFC2822(config); |
| 17086 | if (config._isValid === false) { |
| 17087 | delete config._isValid; |
| 17088 | } else { |
| 17089 | return; |
| 17090 | } |
| 17091 | |
| 17092 | // Final attempt, use Input Fallback |
| 17093 | hooks.createFromInputFallback(config); |
| 17094 | } |
| 17095 | |
| 17096 | hooks.createFromInputFallback = deprecate( |
| 17097 | 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + |
no test coverage detected