Can I apply for F2 COS and H1B extension before I94 expires which is 20 days away

Can I apply for F2 COS and H1B extension before I-94 expires which is 20 days away