This question has options. Is the word "habit" used in the same way in the following two sentences?

It's become a habit of mine to have a cup of coffee after dinner.

It was their habit to dine at 7 every evening.

OPT:
[A]. different meanings.
[B]. the same meaning.
[B].