This commit is contained in:
2025-07-29 12:33:51 +00:00
parent dfbf66e339
commit 9dd55543e9
5 changed files with 860 additions and 279 deletions

View File

@@ -251,8 +251,16 @@ export class ExportBuilder {
const startDate = new Date();
startDate.setDate(startDate.getDate() - days);
this.options.dateStart = startDate.toISOString().split('T')[0];
this.options.dateEnd = endDate.toISOString().split('T')[0];
// Format as DD-MM-YYYY for bunq API
const formatDate = (date: Date): string => {
const day = String(date.getDate()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, '0');
const year = date.getFullYear();
return `${day}-${month}-${year}`;
};
this.options.dateStart = formatDate(startDate);
this.options.dateEnd = formatDate(endDate);
return this;
}
@@ -264,8 +272,16 @@ export class ExportBuilder {
const startDate = new Date(now.getFullYear(), now.getMonth() - 1, 1);
const endDate = new Date(now.getFullYear(), now.getMonth(), 0);
this.options.dateStart = startDate.toISOString().split('T')[0];
this.options.dateEnd = endDate.toISOString().split('T')[0];
// Format as DD-MM-YYYY for bunq API
const formatDate = (date: Date): string => {
const day = String(date.getDate()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, '0');
const year = date.getFullYear();
return `${day}-${month}-${year}`;
};
this.options.dateStart = formatDate(startDate);
this.options.dateEnd = formatDate(endDate);
return this;
}