Skip to content

Commit

Permalink
Remove unnecessary logging left over from #839
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshadfield committed Jan 2, 2020
1 parent 6427293 commit 1f6bc11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 48 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Changelog
---

## version 2.2.1 - 2020/01/03

* Remove unnecessary console log statements.

## version 2.2.1 - 2020/01/03
* Improve conversion functions to go between numeric & calendar dates. [See PR 839](https://github.com/nextstrain/auspice/pull/839)

## version 2.2.0 - 2019/12/16
Expand Down
46 changes: 0 additions & 46 deletions src/util/dateHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,49 +55,3 @@ function isLeapYear(year) {
return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);
}

/* ------------------------------------------------ TMP ---------------------------------------------- */
/* Augur data taken using TreeTime v0.7 at d4450aac32cfafbb62492554d87e23ee4efa168f */
const augurv7Data = [
["1899-07-01", 1899.4972602739726],
["2000-01-01", 2000.0013661202186],
["2016-03-01", 2016.1653005464482],
["2019-01-01", 2019.0013698630137],
["2019-03-01", 2019.16301369863],
["2019-12-01", 2019.9164383561645],
["2100-01-01", 2100.0013698630137]
];
console.log("-------------------");
console.log("Augur -> Treetime v0.7 -> Auspice (match?)");
console.log("-------------------");
augurv7Data.forEach((d) => {
console.log(`${d[0]} -> ${d[1]} -> ${numericToCalendar(d[1])} (${numericToCalendar(d[1]) === d[0]})`);
});

/* Augur data taken using TreeTime v0.6.4.1 */
const augurv641Data = [
["1899-07-01", 1899.498288843258],
["2000-01-01", 2000.002737850787],
["2016-03-01", 2016.167008898015],
["2019-01-01", 2019.002737850787],
["2019-03-01", 2019.1642710472279],
["2019-12-01", 2019.9171800136892],
["2100-01-01", 2100.002737850787]
];
console.log("-------------------");
console.log("Augur -> Treetime v0.6.4.1 -> Auspice (match?)");
console.log("-------------------");
augurv641Data.forEach((d) => {
console.log(`${d[0]} -> ${d[1]} -> ${numericToCalendar(d[1])} (${numericToCalendar(d[1]) === d[0]})`);
});

console.log("")
console.log("-------------------");
console.log("Calendar dates -> numeric (matches Treetime v0.6.4.1 // 0.7*)");
console.log("-------------------");
augurv7Data.forEach((d, i) => {
const n = calendarToNumeric(d[0]);
const isClose = (a, b) => Math.abs(a-b) < 0.000001;
console.log(`${d[0]} -> ${n} (${isClose(n, augurv641Data[i][1])} // ${isClose(n, d[1])})`);
});

/* -------------------------------------------- END TMP ---------------------------------------------- */

0 comments on commit 1f6bc11

Please sign in to comment.