|
|
@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http'; |
|
|
|
import { Injectable } from '@angular/core'; |
|
|
|
import { CreateOrderDto } from '@ghostfolio/api/app/order/create-order.dto'; |
|
|
|
import { Account, DataSource, Type } from '@prisma/client'; |
|
|
|
import { parse } from 'date-fns'; |
|
|
|
import { parse, parseISO } from 'date-fns'; |
|
|
|
import { isFinite } from 'lodash'; |
|
|
|
import { parse as csvToJson } from 'papaparse'; |
|
|
|
import { EMPTY } from 'rxjs'; |
|
|
@ -160,7 +160,11 @@ export class ImportTransactionsService { |
|
|
|
try { |
|
|
|
date = parse(item[key], 'dd/MM/yyyy', new Date()).toISOString(); |
|
|
|
} catch {} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
date = parseISO(item[key]).toISOString(); |
|
|
|
} catch {} |
|
|
|
|
|
|
|
if (date) { |
|
|
|
return date; |
|
|
|
} |
|
|
|