Skip to content

Instantly share code, notes, and snippets.

View bferronato's full-sized avatar
🏠
Working from home

Bruno bferronato

🏠
Working from home
View GitHub Profile
@bferronato
bferronato / SELIC.gs
Created September 21, 2022 17:59 — forked from danperrout/SELIC.gs
API Função SELIC Google Planilhas (Sheets)
/*
* @return Retorna a taxa anual da SELIC de acordo com a data passada (se não for passada nenhuma data retorna a taxa anual do dia de hoje).
* Fonte: https://www.bcb.gov.br/estabilidadefinanceira/selicdadosdiarios
**/
function SELIC(dataConsulta = new Date()) {
var today = Utilities.formatDate(new Date(), "GMT+3", "dd/MM/yyyy");
if (dataConsulta.length == 0)
dataConsulta = new Date()