@bytebrand/export-cars 1.21.65 → 1.21.67
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
|
@@ -374,7 +374,7 @@ export class GoogleTransformer {
|
|
|
374
374
|
|
|
375
375
|
const monthsDifference = (fieldDate - conditionDate) / (1000 * 60 * 60 * 24 * 30);
|
|
376
376
|
|
|
377
|
-
return Math.abs(monthsDifference) <= month;
|
|
377
|
+
return Math.round(Math.abs(monthsDifference)) <= month;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
private getMileage(car: DataSchemes.Car): number {
|
|
@@ -404,8 +404,8 @@ export class GoogleTransformer {
|
|
|
404
404
|
|
|
405
405
|
if (!car.mainData.firstRegistration || this.monthDiffLess(car, 8)) {
|
|
406
406
|
const currentDate = new Date();
|
|
407
|
-
currentDate.setMonth(currentDate.getMonth() - 9);
|
|
408
|
-
timestamp = Math.round(currentDate.getTime() / 1000);
|
|
407
|
+
currentDate.setMonth(currentDate.getMonth() - 9);
|
|
408
|
+
timestamp = Math.round(currentDate.getTime() / 1000);
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
const date = new Date(timestamp * 1000);
|