stats4sd / aec_portfolio

A proof of concept for the AEC Consortium Project Management / Assessment System
GNU General Public License v3.0
0 stars 0 forks source link

[BUG] Get exchange rate data for one year inclusively from free currency API #110

Closed dan-tang-ssd closed 1 year ago

dan-tang-ssd commented 1 year ago

Describe the bug Get exchange rate data for one year inclusively from free currency API

To Reproduce Run command "php artisan app:get-test-exchange-rates [year]"

Expected behavior Only exchange rate data within a year should be retrieved. i.e. From year-01-01 to year-12-31.


I performed below items, found that 2023-01-01 exchange rate data has been retrieved twice.

Get exchange rate data for year 2023, success Get exchange rate data for year 2022, success

2023-01-01 exchange rate data has been retrieved twice. We shuold have 1089 (33 33) records per day. But we have 2178 records (33 33 * 2) records for 2023-01-01.

Proposed solution: The date range is inclusive for getting exchange rate data. Can we specify the date range in below way?

Change FROM: year -01-01 to year+1 -01-01

Change TO : year -01-01 to year -12-31

Screenshots

Retrieved exchange rate data for year 2021. Now it is retrieveing exchange rate data for year 2020. Exchange rate data for 2021-01-01 is > 1089. image

image