From c4e1de3677dfc698ec8b17a8d6e48ce33a27a5c1 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Thu, 23 Mar 2017 20:55:31 -0400 Subject: [PATCH] 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... --- cmd/ofx/bankdownload.go | 2 +- cmd/ofx/banktransactions.go | 2 +- cmd/ofx/ccdownload.go | 2 +- cmd/ofx/cctransactions.go | 2 +- cmd/ofx/invdownload.go | 2 +- cmd/ofx/invtransactions.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/ofx/bankdownload.go b/cmd/ofx/bankdownload.go index e5f2588..2259b24 100644 --- a/cmd/ofx/bankdownload.go +++ b/cmd/ofx/bankdownload.go @@ -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, } diff --git a/cmd/ofx/banktransactions.go b/cmd/ofx/banktransactions.go index f4c01c9..b239b86 100644 --- a/cmd/ofx/banktransactions.go +++ b/cmd/ofx/banktransactions.go @@ -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, } diff --git a/cmd/ofx/ccdownload.go b/cmd/ofx/ccdownload.go index 247882f..9fd2410 100644 --- a/cmd/ofx/ccdownload.go +++ b/cmd/ofx/ccdownload.go @@ -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, } diff --git a/cmd/ofx/cctransactions.go b/cmd/ofx/cctransactions.go index 8133281..6810a77 100644 --- a/cmd/ofx/cctransactions.go +++ b/cmd/ofx/cctransactions.go @@ -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, } diff --git a/cmd/ofx/invdownload.go b/cmd/ofx/invdownload.go index 4e7f2d7..97fad8c 100644 --- a/cmd/ofx/invdownload.go +++ b/cmd/ofx/invdownload.go @@ -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, diff --git a/cmd/ofx/invtransactions.go b/cmd/ofx/invtransactions.go index f8860fa..8b93f8d 100644 --- a/cmd/ofx/invtransactions.go +++ b/cmd/ofx/invtransactions.go @@ -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,