How to get table header value when td is clicked?

How to get table header value when td is clicked?

I have a table as shown:

Day 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Duty Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N N N N

When a particular 'Y' is clicked I need the header value.  I can detect the click but I am not sure how to get the header (the day value).  It appears that the click event is passing the 'Y'.  Does the click event pass other information that can be used to get the header value?

Thanks in advance.
Bill