Reputation: 35
How would I display the day of the week on a certain date in the future, using a Linux command (I'm guessing cal/ncal)? I've tried several things but can't find the solution, nor can I find any help in the man page.
Upvotes: 1
Views: 398
Reputation: 4890
Suggesting date
command, with output format %A
.
$ date -d"2053-01-24" +%A
Friday
You can put any string that can be interpreted as date in -d""
For example:
date -d"+2 years +3 months -4 days" +"%F %A"
2024-08-19 Monday
Upvotes: 2