tenho que fazer um trabalho sobre cotação do dolar e necessito resgatar a cotação do dia anterior, por acaso alguém sabe como eu faria com o primeiro dia do mês?
Welcome Bruno.
You need to access a currency conversion web site using their api to determine and track the exchange rate. Some of these services ar 'free' others require a subscription. Currency conversion api
Here is an example showing how to use a Currrency api with a Web component API: extract a certain value out of the data
This also:
You might use javascript to calculate the last day of a month ( the day before the first day of the current month) https://www.w3resource.com/javascript-exercises/javascript-date-exercise-9.php