Ube Van Grimbergen
Ube Van Grimbergen

Reputation: 35

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

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

Answers (1)

Dudi Boy
Dudi Boy

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

Related Questions