"El elefante nació ayer."
Translation:The elephant was born yesterday.
The subject is not "yesterday" in either of these sentences; the subject is "the elephant" in both. "Yesterday" functions as an adverb whether it comes at the very beginning of the sentence or at the very end. I don't think this sentence is passive either - the subject, the elephant, is doing the action: it is being born.