Calendar Versioning

CalVer is a versioning convention based on your project's release calendar, instead of arbitrary numbers.

Versioning gets better with time.

For maintainers, versioning allows us to specify precise dependencies within an ever-expanding ecosystem. For sellers and promoters, a project's version is a dynamic part of a brand. For all of us, versioning lets us reference the past while upgrading to the future.

Different projects use different systems for versioning, but common practices have emerged. For instance, point-separated numbers (e.g., 3.1.4) are all but given. Another common versioning pattern incorporates a time-based element, usually part of the release date.

This date-based approach has come to be called Calendar Versioning, or CalVer for short.

Contents

Scheme

There are multiple calendar versioning schemes, long used by projects big and small. Rather than declaring a single scheme to be CalVer, it's important to recognize the practicality of each and design the scheme to fit the project. First, the parts of the version:

The vast majority of modern version identifiers are composed of two or three numeric segments, plus the optional modifier. Convention suggests that four-numeric-segment versions are discouraged.

As seen in the case studies below, projects have found more than one useful way to leverage dates in their versions. Rather than choose a single scheme, CalVer introduces standard terminology for developers, in addition to the "semantic" versions:

Note that traditional, incremented version numbers are 0-based, whereas date segments are 1-based, and the short and zero-padded years are relative to the year 2000. Also note that usage of weeks is usually mutually exclusive with months/days.

The Gregorian calendar is assumed, as is the convention of UTC. Technically any calendar can be used, provided projects state which one.

Case studies

CalVer has quite a few users. These are projects selected for their notability and variety of use cases.

Ubuntu

Ubuntu, one of the most prominent Linux-based operating systems available, uses a three-segment CalVer scheme, with a short year and zero-padded month. It has done so from the very start, in October 2004, making 4.10 the first general release of Ubuntu.

Even a simple operating system involves many, many parts, making it difficult to communicate much meaning with an arbitrary number. By dating the project release, the calendar-based version is much more than an arbitrary number, communicating useful information that is rooted in simple fact.

Ubuntu derives additional benefit from its CalVer scheme, by integrating it with their support schedule. Ubuntu currently has five-year support periods for their long-term support (LTS) releases, and only 9 months for non-LTS releases. Thanks to CalVer and elementary arithmetic, any user can easily determine whether their version is still supported. The current LTS release at the time of writing, 16.04, will be supported until April 2021.

Twisted

Twisted, the venerated Python networking and asynchronous execution framework, uses a three-segment CalVer scheme, with a short year in the major version slot, short month in the minor version slot, and micro/patch version in the third and final slot.

First released in 2002 and still actively developed today, Twisted is a mature library that has grown to match its large scope. It features everything from an IRC client to an HTTP server to a slew of utilities for concurrent programming. Like an operating system, Twisted has a lot of parts, making SemVer a poor fit due to the individual parts deprecating and breaking compatibility individually.

The non-deprecated parts of Twisted are backwards-compatible between each successive version, and breaking changes are done on a time basis, where one year must pass and two releases issued between the release deprecating the functionality and the removal of the functionality.

Its versioning scheme has spread to related projects, including Klein, Treq, and even one of Twisted's dependencies, PyOpenSSL.

youtube-dl

youtube-dl, the understated ally of Internet media archivists everywhere, uses a three-segment CalVer scheme, including full year, zero-padded month, and zero-padded day. The version is almost completely calendar-driven, except for a micro segment that is added in some technical contexts.

Despite the name, youtube-dl's scope is expansive. It supports extracting audio and video from a long, ever-expanding list of sites. Consider the rapid release cycle of supported services, and it becomes clear why the project has adopted CalVer to such a great degree.

pytz

pytz is the Python translation of the IANA/Olson timezone database, the database behind accurate times for all of computerdom. pytz uses a two-segment CalVer scheme, including full year and minor version.

While Python has a history of "batteries-included" architecture, and the datetime module frequently mentions timezones, the core Python runtime does not include timezone information. This is because timezone updates do not follow a fixed schedule, and are subject to politics and legislative whim. Calendar versioning offers a date-stamped snapshot of an otherwise chaotic system.

Teradata

The Teradata UDA client provides next-generation access to Teradata's data warehousing technologies.

Teradata's usage is notable not for the prominence of the technology or company, but because there have been multiple releases in 2016 which were versioned as 15.10. This may seem breaking at first, but the meaning and utility is clear.

The library maintainers have crafted a resourceful hybrid of semantic versioning and calendar versioning. The YY.MM part of the version are used as a combined SemVer major version. That is, for new releases, the API of the library remains the same as it did in October 2015. Dependent code written since then is safe to upgrade. We will see the year and month segments update next time there is a breaking API change.

Other notable projects

See the Users page for a growing list of CalVer users.

When to use CalVer

If both you and people you don't know use your project seriously, then use a serious version. Luckily, the decision on whether to use CalVer for that version is easier than ever:

If you answered yes to any of these questions, CalVer's semantics make it a strong choice for your project.


Previously
Controle de versão do calendário