There's no reason that it can't, but you'd need a sensor capable of taking a hydrometer reading.
I've never had a fermentation that's gone on for more than two weeks, so I'd assume it was done by then. If I change what I'm brewing to something where I would expect it to take longer than two...