A version code — also called a build number — is a short stamp appended to your product version to identify exactly when a build was produced. Instead of hand-incrementing a counter and committing it on every release, you generate the code automatically at build time.
This generator uses the YYMMDDCCC format: a fixed 9-digit integer that is unique for each 2-minute window and can be read back "by a human" to recover the build date and time. It pairs naturally with a semver product version, e.g. 1.0.3-260607251.
The build number is the concatenation of the date and a time counter. The counter is the number of 2-minute intervals elapsed since midnight, so a fresh code is available every two minutes — enough for typical CI/CD pipelines that build after each push.
| Part | Digits | Meaning |
|---|---|---|
| YY | 2 | Year modulo 100 (e.g. 2026 → 26) |
| MM | 2 | Month, 01–12 |
| DD | 2 | Day of month, 01–31 |
| CCC | 3 | 2-minute intervals since midnight = floor((H×60 + M) / 2) |
Example: 260607251 decodes to 2026-06-07 at 08:22. Add a product-version prefix and separator to get a full version like 1.0.3-260607251.
CCC counter increments once per 2-minute interval since midnight.YYMMDDCCC maps directly back to a date and a time floored to the nearest 2 minutes.