President Obama gave a commitment yesterday to begin pulling troops out of Afghanistan by July 2011.
As I've pointed out on this site before, once you set a timetable for withdrawal, you have doomed yourself to defeat. The enemy knows that he must merely wait you out - and, perhaps, force you to bring forward your timetable by escalating his efforts. You demoralise your troops, who wonder why on earth they're giving their all to an apparently important campaign that's about to cease at some arbitrary near-future date; and you demoralise your allies in the country concerned, who now have a date on the calendar on which to focus their dread of your impending abandonment.
Thus, it is absurd to state that your commitment to a conflict is time-limited. To advance this point, it ought to be noted, is entirely neutral on the merits of having entered the conflict in the first place (merits you might find difficult to weigh up in any case, as I've written elsewhere in relation to another conflict); this is a question of how you conduct yourself once you're there.