diff options
Diffstat (limited to 'convert.py')
-rw-r--r-- | convert.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -80,6 +80,14 @@ speed = {'Kilometers/Hour': (1, 1), 'Meter/Second': (3.59712230216, 0.278), } +time = {'day': (1, 1), 'Week': (7, 0.14285714285714285), + 'Month': (30.4375, 0.03285420944558522), + 'Year': (365.25, 0.0027378507871321013), + 'Hour': (0.041666666666666664, 24), + 'Minute': (0.0006944444444444445, 1440), + 'Second': (0.000011574074074074073, 86400) + } + def convert(number, unit, to_unit, dic): main_unit = number * dic[unit][0] |