@bytebrand/export-cars 1.21.63 → 1.21.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -380,7 +380,7 @@ export class GoogleTransformer {
|
|
|
380
380
|
private getMileage(car: DataSchemes.Car): number {
|
|
381
381
|
let mileage = get(car, 'mainData.mileage', 0);
|
|
382
382
|
|
|
383
|
-
if (
|
|
383
|
+
if (mileage < 1000)
|
|
384
384
|
mileage = 1001
|
|
385
385
|
|
|
386
386
|
return !mileage ? 10 : mileage;
|
|
@@ -401,6 +401,9 @@ export class GoogleTransformer {
|
|
|
401
401
|
if (!timestamp) {
|
|
402
402
|
timestamp = Math.round(new Date().getTime() / 1000);
|
|
403
403
|
}
|
|
404
|
+
if (!car.mainData.firstRegistration || this.monthDiffLess(car, 8)) {
|
|
405
|
+
timestamp = moment().subtract(9, 'months').unix()
|
|
406
|
+
}
|
|
404
407
|
|
|
405
408
|
const date = new Date(timestamp * 1000);
|
|
406
409
|
const month = date.getUTCMonth() + 1;
|