Your tax codes aren’t going to update the minute you say your vows. Someone needs to do that on the other side and let you know when it’s been processed.
I guess it depends if the government recognizes the marriage date that is declared, or the date that they process it (if the marriage was not in front of an official).
Divorce date can be pretty random, since it's rarely done live by a judge/official.