Skip to content

Instantly share code, notes, and snippets.

@jrmarqueshd
Last active October 13, 2019 22:38
Show Gist options
  • Save jrmarqueshd/a5a2ff3f583c925b094778701b198651 to your computer and use it in GitHub Desktop.
Save jrmarqueshd/a5a2ff3f583c925b094778701b198651 to your computer and use it in GitHub Desktop.
function printWeek(dataObj, elementPrint) {
if (dataObj.getDay() == 0) {
elementPrint.innerText = "Dom";
} else if (dataObj.getDay() == 1) {
elementPrint.innerText = "Seg";
} else if (dataObj.getDay() == 2) {
elementPrint.innerText = "Ter";
} else if (dataObj.getDay() == 3) {
elementPrint.innerText = "Qua";
} else if (dataObj.getDay() == 4) {
elementPrint.innerText = "Qui";
} else if (dataObj.getDay() == 5) {
elementPrint.innerText = "Sex";
} else if (dataObj.getDay() == 6) {
elementPrint.innerText = "Sáb";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment