Input a number and return day of week Not restricted to any one programming language.

What I'm saying is you pass 1 to it and it returns Monday, 7 corresponds with sunday and so on. 

I've managed a 146 byte statement in Java to do the same.

return (n&lt;1?"invalid":(n&lt;2?"monday":(n&lt;3?"tuesday":(n&lt;4?"wednesday":(n&lt;5?"thursday":(n&lt;6?"friday":(n&lt;7?"saturday":(n&lt;8?"sunday":"invalid"))))))));


Your program should:


output full words (STDOUT)
not crash if the input is less than 1 or greater than 7
Bash: 47 bytes

Still no bash entry? I'm disappointed ...

case $1 in
    [1-7]) date -d "14-08-1$1" +%A
esac


It uses the days of the current week and simply substitutes the last digit (11-17 August 2014 -- 11 is Monday, 12 is Tuesday, etc.).