That's
20 Month by Machine I think.
SUMMARY: Buffy and Spike share a drunken night then decide to marry after Buffy finds out she is pregnant. They don't love each other. They barely know each other. But they marry under the agreement to divorce one year and one month after Buffy gives birth in order to keep Buffy and the child away from Buffys abusive parents. Is that the one? I know both, the book and the story; the story is a bit different but based on it.
*edit* It says in the German translation that it is based on the Book by Lavyrle Spencer.