Linux date Command: Day of Week
To find the day of week (e.g. Friday) on a particular date using the Linux version of the `date` utility, execute: $ date -d 'Jan 03 2004' "+%a" Sat The -d flag tells the utility to display the information only, instead of setting the date, etc. The "+%a" options are`date`'s FORMAT options, which are listed in the manpages. So, for example, we can also have the full name of the weekday output by changing the "+%a" to "+%A". $ date -d 'Jan 03 2004' "+%A" Saturday DATE(1) User Commands NAME date - print or set the system date and time SYNOPSIS date [OPTION]... [+FORMAT] ... ... FORMAT controls the output. Interpreted sequences are: %% a literal % %a locale's abbreviated weekday name (e.g., Sun) %A locale's full weekday name (e.g., Sunday) %b locale's abbreviated month name (e.g., Jan) %B