update
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user