linux display the day of the week of your birthday in 2050

Viewed 33

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.

1 Answers

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
Related