Only download transactions for the last year

Some FIs don't return *any* transactions if you ask them for *all* of
them since the beginning of (UNIX) time...
This commit is contained in:
Aaron Lindsay 2017-03-23 20:55:31 -04:00
parent f511c6ca75
commit c4e1de3677
6 changed files with 6 additions and 6 deletions

View File

@ -54,7 +54,7 @@ func download() {
AcctId: ofxgo.String(acctId),
AcctType: ofxgo.String(acctType),
},
DtStart: ofxgo.Date(time.Unix(0, 0)),
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
DtEnd: ofxgo.Date(time.Now()),
Include: true,
}

View File

@ -39,7 +39,7 @@ func bankTransactions() {
AcctId: ofxgo.String(acctId),
AcctType: ofxgo.String(acctType),
},
DtStart: ofxgo.Date(time.Unix(0, 0)),
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
DtEnd: ofxgo.Date(time.Now()),
Include: true,
}

View File

@ -48,7 +48,7 @@ func ccDownload() {
CCAcctFrom: ofxgo.CCAcct{
AcctId: ofxgo.String(acctId),
},
DtStart: ofxgo.Date(time.Unix(0, 0)),
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
DtEnd: ofxgo.Date(time.Now()),
Include: true,
}

View File

@ -35,7 +35,7 @@ func ccTransactions() {
CCAcctFrom: ofxgo.CCAcct{
AcctId: ofxgo.String(acctId),
},
DtStart: ofxgo.Date(time.Unix(0, 0)),
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
DtEnd: ofxgo.Date(time.Now()),
Include: true,
}

View File

@ -52,7 +52,7 @@ func invDownload() {
BrokerId: ofxgo.String(brokerId),
AcctId: ofxgo.String(acctId),
},
DtStart: ofxgo.Date(time.Unix(0, 0)),
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
DtEnd: ofxgo.Date(time.Now()),
Include: true,
IncludeOO: true,

View File

@ -38,7 +38,7 @@ func invTransactions() {
BrokerId: ofxgo.String(brokerId),
AcctId: ofxgo.String(acctId),
},
DtStart: ofxgo.Date(time.Unix(0, 0)),
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
DtEnd: ofxgo.Date(time.Now()),
Include: true,
IncludeBalance: true,