I think you're right, but the author probably did not mean the advice as literally as you're reading it. You're interpreting the advice as a call for egoism [0]; selfishness to the point of being unwise. I think that when people write this, they're actually writing a call for hedonism[1].
Hedonism is different from egoism. Hedonism, the way I see it, is realizing that our existence is ultimately meaningless, and that we should optimize for our own happiness (and well-being) rather than any other metric; all metrics are meaningless, so we might as well stick to what makes us happy. In actionable terms, embracing hedonism means realizing that you should aim towards doing things that make you happy, and that this aim should be your guiding force (at every "single moment in life"). This doesn't mean that you should be happy every single moment; it means you should be optimizing for happiness every single moment. (To use your examples: a spouse knows that compromising will make them happier overall; a janitor knows that although his/her life aren't perfect, doing this is what will lead to his/her life improving (hopefully) or at least keeping them happier.)
Anyway, that's the way I understand this type of advice, and I appreciate the occasional reminders. (Also, I don't actually know much about philosophy, so I might be misusing terminology here; if so, please correct me!)
[0] http://en.wikipedia.org/wiki/Ethical_egoism (maybe?)