Created
July 27, 2019 16:02
-
-
Save xbrunosousa/7c8f102516d57d4fbc2981580b229bb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getGreetings = () => { | |
const h = new Date().getHours(); | |
if (h <= 11) { | |
return 'Bom dia'; | |
} else if (h >= 12 && h <= 17) { | |
return 'Boa tarde'; | |
} else if (h >= 18 && h <= 23) { | |
return 'Boa noite'; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment