I lost my mind in San Francisco

Somewhere near How to calculate the day of the week for a given date I got lost in: