If you look at: https://docs.moodle.org/dev/Releases you will see that the number is the release date for the major version, with the minor version in the last 2 digits (3.5 was released on 17th May 2018, and 3.5.2 is version 02 of the 3.5 release).
This ensures that major versions of Moodle always have a version number higher than that of any of the minor versions of the previous major version.