Fixed #17: Negative relative times are incorrect

This commit is contained in:
Mark van Renswoude 2018-02-12 21:16:30 +01:00
parent 2e1b286346
commit a3aecf082a
4 changed files with 1069 additions and 1067 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4,10 +4,10 @@
const uint8_t VersionMajor = 2; const uint8_t VersionMajor = 2;
const uint8_t VersionMinor = 0; const uint8_t VersionMinor = 0;
const uint8_t VersionPatch = 0; const uint8_t VersionPatch = 0;
const uint8_t VersionMetadata = 35; const uint8_t VersionMetadata = 39;
const char VersionBranch[] = "release/2.0"; const char VersionBranch[] = "release/2.0";
const char VersionSemVer[] = "2.0.0-beta.1"; const char VersionSemVer[] = "2.0.0-beta.1";
const char VersionFullSemVer[] = "2.0.0-beta.1+35"; const char VersionFullSemVer[] = "2.0.0-beta.1+39";
const char VersionCommitDate[] = "2018-02-03"; const char VersionCommitDate[] = "2018-02-12";
#endif #endif

View File

@ -833,11 +833,12 @@ function startApp()
{ {
var result = ''; var result = '';
if (isRelative && time >= 0) if (isRelative)
result += '+'; result += time >= 0 ? '+' : '-';
time = Math.abs(time);
var hours = Math.floor(time / 60); var hours = Math.floor(time / 60);
var minutes = Math.abs(time) % 60; var minutes = time % 60;
result += hours + ':'; result += hours + ':';
if (minutes < 10) if (minutes < 10)

2
web/dist/bundle.js vendored

File diff suppressed because one or more lines are too long