Date Distance

Overview

Calculate a distance from two years.

As minimal year 1970 is assumed.

Example Usage

>>> from munin.distance import DateDistance
>>> dfunc = DateDistance()
>>> dfunc.do_compute((1970,), (2014))
1.0
>>> dfunc.do_compute((1970,), (1970))
0.0
>>> dfunc.do_compute((2014,), (1992))
0.5

Reference

class munin.distance.date.DateDistance(**kwargs)[source]

Compare the distance of two years, map them inbetween [0.0, 1.0]

As minimal year 1970 is assumed, as maximal year the current year.

class munin.distance.date.DateDistance(**kwargs)[source]

Compare the distance of two years, map them inbetween [0.0, 1.0]

As minimal year 1970 is assumed, as maximal year the current year.

Table Of Contents

Related Topics

This Page

Useful links:

Package:

Github: