How to het Last-Modified date of HTTP head via shell script
===

I want to set the last modified date of a file on a remote HTTP server to a shell script variable.

    CATEGORIES_DATE=$(date -d "$(curl -s -I -u ${URL} | grep Last-Modified | SOMETHING HERE)" +%Y-%m-%d)

The server is responding with: `Last-Modified: Sat, 28 Jul 2012 09:15:30 GMT` and I want to have `CATEGORIES_DATE=2012-07-28` in the end.