I'm so sorry. I know exactly how you are feeling...my mother was given three years when she was diagnosed with leukemia. She was doing great, then an unexpected complication happened and she went from doing great to leaving us in a matter of three weeks.
There is no feeling on earth like losing your mother, and knowing it is going to happen makes it much worse. But like a doctor once told me, never, ever lose hope. As long as medicine continues to makes advances by leaps and bounds, there is always reason to hope.
Spend time with your mother, you will not regret later that you missed a day's work, or a social occasion or anything you give up to spend time with her. You will find you are glad for the gifts she gives you in that time...the stories she will share, the memories you will make together, the quiet times just spent in each other's presence.
My thoughts and prayers go out to you, you have a difficult road ahead, let hope and faith buoy your spirits during this time.