Update webapp to accept scan time as timestamp not ISO 8601 datestring
This commit is contained in:
parent
7f0745d772
commit
a6e48f8882
1 changed files with 3 additions and 3 deletions
|
|
@ -240,8 +240,6 @@ export default {
|
||||||
this.scans = scans;
|
this.scans = scans;
|
||||||
}
|
}
|
||||||
scans.forEach(scan => {
|
scans.forEach(scan => {
|
||||||
scan.modified = Date.parse(scan.modified);
|
|
||||||
scan.created = Date.parse(scan.created);
|
|
||||||
scan.can_stitch = !scan.stitch_available && scan.number_of_images > 3;
|
scan.can_stitch = !scan.stitch_available && scan.number_of_images > 3;
|
||||||
});
|
});
|
||||||
scans.sort((a, b) => {
|
scans.sort((a, b) => {
|
||||||
|
|
@ -255,7 +253,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
let d = new Date(timestamp);
|
// Multiply by 1000 as JS uses ms not s
|
||||||
|
let d = new Date(timestamp*1000);
|
||||||
|
// Convert to a sting in a very javascript way!
|
||||||
let yyyy = d.getFullYear();
|
let yyyy = d.getFullYear();
|
||||||
let mm = d.getMonth() + 1;
|
let mm = d.getMonth() + 1;
|
||||||
let dd = d.getDate();
|
let dd = d.getDate();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue