MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / duration

Function duration

main.js:594–618  ·  view source on GitHub ↗
(start, end, full)

Source from the content-addressed store, hash-verified

592 years--
593 months = 12 - then.getUTCMonth() + now.getUTCMonth()
594 } else {
595 months = now.getUTCMonth() - then.getUTCMonth()
596 }
597 if (now.getUTCDate() < then.getUTCDate()) {
598 months--
599 }
600 return years + '.' + months;
601}
602
603function getAppVersion (callback) {
604 fs.readFile(settings.TGX_SOURCE_PATH + '/version.properties', 'utf-8', function (err, data) {
605 if (err) {
606 callback(null);
607 } else {
608 const buildVersion = parseInt(getProperty(data, 'version.app'));
609 const creationDate = parseInt(getProperty(data, 'version.creation'));
610 const ndkPrimary = getProperty(data, 'version.ndk_primary');
611 const ndkLegacy = getProperty(data, 'version.ndk_legacy');
612 if (!creationDate) {
613 callback('#' + buildVersion);
614 return;
615 }
616 const majorVersion = getProperty(data, 'version.major');
617 getCommitDate((commitDate) => {
618 const buildDate = new Date(commitDate * 1000);
619 const fromDate = new Date(creationDate);
620 const minorVersion = monthYears(buildDate, fromDate);
621 callback({

Callers 1

processPrivateCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected