Depending on the complexity of what you're trying to make a mod and how high quality, then it could take from 2 weeks up to 6 months. For a game, including updates, it takes at least 3 up to 10 years to make. There is of course exceptions on both parts. Even porting a game from one platform to an another may take several years if it was poorly coded.
This is because a game includes so much things that modders does not need to think about, like: input, rendering, sound, drivers, networking and even physics. All those things takes more time to make than the modding system itself.
Of course, if taken an engine that already have those things implemented, it still will take time to implement all the functionality using those functionalities. And most of the time you need to make workarounds to make your game work correctly with the engine as good as possible. Sometimes it takes more time to fix your game than what it took creating it.
In conclusion: Creating a new game takes in most cases more time than modding an existing one due to that it requires to create or manage the engine behind it.