How to understand version numbers


i have a project using a ESP32 with arduino framework and i would like to configure PlatformIO to use a specific framework version (1.0.5 in my case).

I already checked Espressif 32 — PlatformIO latest documentation and got some ideas how to do that.

My problem right now is that i can’t understand platformio version numbers.
in my platform.json i have:

“framework-arduinoespressif32”: {
“type”: “framework”,
“optional”: true,
“owner”: “platformio”,
“version”: “~3.10006.0”

In the “version” we have something like X.Y.Z, i can see that the Y has something to do with 1.0.6 from the latest release from arduino-esp32 framework. but i can’t understand what X and Z means.

Is there any documentation explaining how this version numbers works?

See Find the mbed version which was used before a backup? - #4 by maxgerhardt.

For the ~ etc. modifiers before a version, see semver.