| 506 | } |
| 507 | |
| 508 | function monthYears (now, then) { |
| 509 | let years = now.getUTCFullYear() - then.getUTCFullYear() |
| 510 | let months = 0; |
| 511 | if (now.getUTCMonth() < then.getUTCMonth() || |
| 512 | (now.getUTCMonth() === then.getUTCMonth() && now.getUTCDate() < then.getUTCDate())) { |
| 513 | years-- |
| 514 | months = 12 - then.getUTCMonth() + now.getUTCMonth() |
| 515 | } else { |
| 516 | months = now.getUTCMonth() - then.getUTCMonth() |
| 517 | } |
| 518 | if (now.getUTCDate() < then.getUTCDate()) { |
| 519 | months-- |
| 520 | } |
| 521 | return years + '.' + months; |
| 522 | } |
| 523 | |
| 524 | function getAppVersion (callback) { |
| 525 | fs.readFile(settings.TGX_SOURCE_PATH + '/version.properties', 'utf-8', function (err, data) { |