(string)
| 3107 | var chunkOffset = /([\+\-]|\d\d)/gi; |
| 3108 | |
| 3109 | function offsetFromString(string) { |
| 3110 | var matches = ((string || '').match(matchOffset) || []); |
| 3111 | var chunk = matches[matches.length - 1] || []; |
| 3112 | var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; |
| 3113 | var minutes = +(parts[1] * 60) + toInt(parts[2]); |
| 3114 | |
| 3115 | return parts[0] === '+' ? minutes : -minutes; |
| 3116 | } |
| 3117 | |
| 3118 | // Return a moment from input, that is local/utc/zone equivalent to model. |
| 3119 | function cloneWithOffset(input, model) { |
no test coverage detected