I was notified almost 2 weeks before, and for a H1b with the current job market, it was tough. I was told initially that I would be marketed for a month, but it didnt happen in my case, even though higher management had confirmation that their contract with my then client would end.