Last active
January 2, 2025 22:01
-
-
Save smartwatermelon/08c4fdad3ea5b99bb0e9cb7d7a4f0df2 to your computer and use it in GitHub Desktop.
@cassidoo's interview question from December 30, 2024, in Bash
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
| $ newYearsDay(){ date -v "${1:-$(date +"%Y")}y" -v 01m -v 01d +"%A"; } | |
| $ newYearsDay 2025 | |
| Wednesday | |
| $ newYearsDay 2024 | |
| Monday | |
| $ newYearsDay # default value is current year | |
| Wednesday |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment