MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / getWeekdayName

Function getWeekdayName

services/holidays/index.js:8–21  ·  view source on GitHub ↗
(dateString)

Source from the content-addressed store, hash-verified

6 * @returns {string} Nome do dia da semana
7 */
8export function getWeekdayName(dateString) {
9 const weekdays = [
10 'domingo',
11 'segunda-feira',
12 'terça-feira',
13 'quarta-feira',
14 'quinta-feira',
15 'sexta-feira',
16 'sábado',
17 ];
18
19 const date = new Date(dateString + 'T12:00:00');
20 return weekdays[date.getDay()];
21}
22
23/**
24 * Tabela da lua cheia de Páscoa, valida entre 1900 e 2199, inclusive.

Callers 2

getEasterHolidaysFunction · 0.70
getNationalHolidaysFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected