Misbehaving toddler.

I watch my little nephew four days out of the week, whole days. I have no child of my own, he is always hitting, bitting and kicking, and pulling hair when he doesn't get his way. Both his parents work, so he spends most his time with me. I am starting to get depressed because he is always doing something mean. Like attacking the dog, attacking me every chance he gets. when he is by his dad, he doesn't do anything mean. He will give me a look and smile before he does something he knows he's not allowed to do. He is super smart. I know that he is young and trying to learn but what should I do? Any advice? his parents tell me to spank him, put him in time out and than explain to him what he did is wrong, in simple words. i know it's not working at all and I don't like the idea of spanking him. I'm at a lost and just emotional tired.

since I have no kids, I don't know what to do or if this is normal for an almost 2 year old. (I also feel bitter because I'm not his mom and everyone in my family tells me what I am doing wrong. I just wanted to be the fun aunt... not his nanny. I feel like I am rising their child) I love him to death and will do anything for him. But I just wanna cry most days. Today is extra frustrating, because he just laughs as he's doing it. I am trying my hardest to stay calm so he knows that it's not okay, but he knows he's getting me worked up.