MCPcopy
hub / github.com/jayfk/statuspage / Zc

Function Zc

statuspage/template/statuspage.js:307–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305function Wc(a,b){return Vc(this,a,b,1)}
306// supports only 2.0-style subtract(1, 's') or subtract(duration)
307function Xc(a,b){return Vc(this,a,b,-1)}function Yc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Zc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;
308// if we have a mix of positive and negative values, bubble down first
309// check: https://github.com/moment/moment/issues/2166
310// The following code bubbles up values, see the tests for
311// examples of what that means.
312// convert days to months
313// 12 months -> 1 year
314return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Yc(_c(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=s(f/1e3),i.seconds=a%60,b=s(a/60),i.minutes=b%60,c=s(b/60),i.hours=c%24,g+=s(c/24),e=s($c(g)),h+=e,g-=Yc(_c(e)),d=s(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function $c(a){
315// 400 years have 146097 days (taking into account leap year rules)
316// 400 years have 12 months === 4800
317return 4800*a/146097}function _c(a){

Callers

nothing calls this directly

Calls 4

YcFunction · 0.85
_cFunction · 0.85
sFunction · 0.85
$cFunction · 0.85

Tested by

no test coverage detected