bibliotekar.metadata.Version#

class bibliotekar.metadata.Version(date, revision)[source]#

The version of some code.

Uses Calendar Versioning with format

YY.MM.DD.n

Where n is the revision number and starts at 0 for each day.

Example:

"25.09.11.0"
__init__(date, revision)[source]#

Methods

__init__(date, revision)

is_same_day_as(other)

Return true if self and other refer to the same calendar day.

parse(version)

today([revision])

Return a new version with today's date.

with_bumped_revision()

Return a new version with an incremented revision number.

is_same_day_as(other)[source]#

Return true if self and other refer to the same calendar day.

Return type:

bool

classmethod today(revision='0')[source]#

Return a new version with today’s date.

Return type:

Version

with_bumped_revision()[source]#

Return a new version with an incremented revision number.

Return type:

Version