MCPcopy Index your code
hub / github.com/csev/py4e / offsetFromString

Function offsetFromString

code/gmane/Chart.bundle.js:3109–3116  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

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) {

Callers 3

Chart.bundle.jsFile · 0.85
getSetOffsetFunction · 0.85
setOffsetToParsedOffsetFunction · 0.85

Calls 1

toIntFunction · 0.85

Tested by

no test coverage detected