Created
August 22, 2022 15:38
-
-
Save pjbelo/0aaa4a21564d0d7b5994c518cf3b68c8 to your computer and use it in GitHub Desktop.
print weekday name (v1) [dart]
This file contains hidden or 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
const Map<int, String> weekdayName = {1: "Monday", 2: "Tuesday", 3: "Wednesday", 4: "Thursday", 5: "Friday", 6: "Saturday", 7: "Sunday"}; | |
void main() { | |
print(weekdayName[DateTime.now().weekday]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment