>>28380559XY were in development since BW (~3 years), but most of it was spent developing the 3D models and the new engine rather than on the actual in game content.
ORAS literally had 1 year of development (Started November 23, 2012) and finished near the end of 2013.
Sun and Moon appears to be a more refined engine of XY, and while we don't know how long it was in development, we now don't have to worry about models for every single Pokémon only then new ones, this way more development is spent on the in game content.