Written motions generally are due served at least fourteen (14) days before the scheduled hearing, unless the rules set a different time. Fed. R. Civ. P. 6(c)(1).) However, note that local rules often supersede this rule.
Links to Deadline Calculator Pages for Pertinent Federal Court Deadlines:
Answers to Counterclaims and Crossclaims
Reply to an Answer (If Ordered)
Effect of a Motion on the Answer Deadline
Responses to Discovery Requests
Affidavits in Opposition to Motions
Motion for a More Definite Statement