(matcher, string)
| 3320 | var chunkOffset = /([\+\-]|\d\d)/gi; |
| 3321 | |
| 3322 | function offsetFromString(matcher, string) { |
| 3323 | var matches = (string || '').match(matcher), |
| 3324 | chunk, |
| 3325 | parts, |
| 3326 | minutes; |
| 3327 | |
| 3328 | if (matches === null) { |
| 3329 | return null; |
| 3330 | } |
| 3331 | |
| 3332 | chunk = matches[matches.length - 1] || []; |
| 3333 | parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; |
| 3334 | minutes = +(parts[1] * 60) + toInt(parts[2]); |
| 3335 | |
| 3336 | return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; |
| 3337 | } |
| 3338 | |
| 3339 | // Return a moment from input, that is local/utc/zone equivalent to model. |
| 3340 | function cloneWithOffset(input, model) { |
no test coverage detected
searching dependent graphs…