Per IRS Publication 17, Your Federal Income Tax For Individuals, page 23:
Considered married. You are considered married for the whole year if, on the last day of your tax year, you and your spouse meet any one of the following tests.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.