Commit 875b6ebd authored by Mathieu Giraud's avatar Mathieu Giraud

model.js: 'delta_date_no_zero' time format

For some exports, including publications, one may wish to remove absolute dates.
parent 9d3d2d96
......@@ -283,6 +283,7 @@
<input type="checkbox" onclick=" this.checked ? $('#fps').css('display', '') : $('#fps').css('display', 'none');">display fps</input></br>
<input type="checkbox" onclick=" this.checked ? myConsole.openLog() : myConsole.closeLog() ;">log</input>
<a class="buttonSelector" onclick="db.call('default/user/register')">register new user</a>
<div class="buttonSelector" onclick="m.changeTimeFormat('delta_date_no_zero', true)"><input type="radio" name="time" value="delta_date_no_zero">day after first sample (no zero)</input></div>
</div></div>
</div>
......
......@@ -1455,11 +1455,16 @@ Model.prototype = {
break;
case "delta_date":
case "delta_date_no_zero":
if ((typeof this.samples.timestamp != 'undefined') && this.samples.timestamp[0]){
var time0 = this.samples.timestamp[0];
if (timeID == '0'){
result = time0.split(" ")[0];
if (format == "delta_date_no_zero")
result = "";
break;
}else{
if ((typeof this.samples.timestamp != 'undefined') && this.samples.timestamp[timeID]){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment