MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / calculateOffset

Function calculateOffset

tests/test_code/js/moment/moment.js:2467–2479  ·  view source on GitHub ↗
(obsOffset, militaryOffset, numOffset)

Source from the content-addressed store, hash-verified

2465 }
2466
2467 function calculateOffset(obsOffset, militaryOffset, numOffset) {
2468 if (obsOffset) {
2469 return obsOffsets[obsOffset];
2470 } else if (militaryOffset) {
2471 // the only allowed military tz is Z
2472 return 0;
2473 } else {
2474 var hm = parseInt(numOffset, 10),
2475 m = hm % 100,
2476 h = (hm - m) / 100;
2477 return h * 60 + m;
2478 }
2479 }
2480
2481 // date and time from ref 2822 format
2482 function configFromRFC2822(config) {

Callers 1

configFromRFC2822Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected