lottery winnings

are the lottery winnings taxable in the year the ticket was purchased or the year it was cashed in.