Former Proteas all-rounder JP Duminy has called it a day from all forms of cricket.

The 35-year-old's Test career ended in 2017 and he retired from the ODI and T20I formats after last year's World Cup in England.

After the World Cup, the left-hander featured in the Global T20 Canada and the Caribbean Premier League (CPL) last year and was set to feature for the Paarl Rocks in the Mzansi Super League before an injury cut short his plans.

He took on a mentorship role with the Rocks instead and helped the Paarl-outfit win the tournament.

In an interview with IOL, Duminy explained his reasons for quitting the game: "I am young enough to play and still earn money from the franchise game, but I am lacking a strong purpose with that. I played CPL and Canadian Premier League. I found at the CPL there is hunger for young players to seek out older players. I don't know what's next. I had to take a bold step of closing a door before I could open the next door."

Duminy played 46 Tests, 199 ODIs and 81 T20Is for South Africa.

He scored 2 103 Test runs at an average 32.85 and chalked up 5 117 (36.81) and 1 934 (38.68) in the ODI and T20I formats respectively.

He was also a handy off-spinner and took more than 100 international wickets across the three formats.