The Edo Period was the age of the samurai...and then the aliens landed.

Gintama is a comedy/action anime that takes place in Japan's Edo Period, 20 years after aliens landed and waged war with the samurai. With their superior technology, the samurai quickly lost and relinquished their weapons, thus beginning the Sword Prohibition Act.
The main character is Gintoki, a man who runs a shop called the Yorozuya (literally means do-everything-shop). Gintoki is an ex-samurai who fought the repel the aliens in the previous war, but nowadays he spends his time lazying around with an apathetic attitude.
The anime features several anime/tv-show references. While most of the episodes are comedy, they really don't have much of a point after the first 10-ish, and can be easily skipped over to get to the action(48,58, theres more but I haven't watched it all the way through) if that's more what you're into.
Episode count: Currently 150+
Links:
http://www.narutowire.com/120/Gintama -anime
http://www.onemanga.com/Gintama/ -manga