Question: can yesterday be a noun?
Answer: They can work as nouns or adverbs. For example: "Yesterday was a great day"; here, yesterday works as a noun. "I will do that tomorrow"; here, tomorrow works as an adverb.