The question isn't really how long do you ferment something.
Because you ferment something until it's done fermenting.
The question is really "How long do you leave it after fermentation is complete?"
No instruction can tell you how long something is going to take. Because the yeast are in charge, not the writer of the instructions, and not you, the brewer.
If your gravity is at 1.026, then it definitely isn't done yet. Especially if you are seeing krausen.
I would give the fermenter a light swril to kick up any yeast and wrap it in a blanket, or move it to a slightly warmer place. And check the gravtiy in another week.
But you are not done yet by a long shot.
In Mr Wizard's colum in BYO awhile back he made an interesting analogy about brewing and baking....He said that egg timers are all well and good in the baking process but they only provide a "rule of thumb" as to when something is ready...recipes, oven types, heck even atmospheric conditions, STILL have more bearing on when a cake is ready than the time it says it will be done in the cook book. You STILL have to stick a toothpick in the center and pull it out to see if truly the cake is ready.....otherwise you may end up with a raw cake....
Not too different from our beers....We can have a rough idea when our beer is ready (or use the stupid 1-2-3 rule which, doesn't factor in things like yeast lag time or even ambient temp during fermentation and do things to our beer willy nilly, like moving it too early, or thinking our beer is going to be drinkable at 3 weeks....but unless we actually stick "our toothpick" (the hydrometer) in and let it tell us when the yeasties are finished...we too can "f" our beer up.
You can't really do something arbitrarily, you have to learn to "read" your beers, the hydrometer is the best way to do that.
You will find that many of us leave our beers in primary for 3-4 weeks (or more) and only secondary if we are adding fruit or oak, or to dry hop (though many of us dry hop in primary now as well)....and we have found our beer vastly improved by letting the beer stay in contact with the yeast.
There's been a big shift in brewing consciousness in the last few years where many of us believe that yeast is a good thing, and besides just fermenting the beer, that they are fastidious creatures who go back and clean up any by products created by themselves during fermentation, which may lead to off flavors.
Rather than the yeast being the cause of off flavors, it is now looked at by many of us, that they will if left alone actually remove those off flavors, and make for clearer and cleaner tasting beers.
Even John Palmer talks about this in How To Bew;
How To Brew said:
Leaving an ale beer in the primary fermentor for a total of 2-3 weeks (instead of just the one week most canned kits recommend), will provide time for the conditioning reactions and improve the beer. This extra time will also let more sediment settle out before bottling, resulting in a clearer beer and easier pouring. And, three weeks in the primary fermentor is usually not enough time for off-flavors to occur.