Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/convert.py
diff options
context:
space:
mode:
Diffstat (limited to 'convert.py')
-rw-r--r--convert.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/convert.py b/convert.py
index 8fe8fd4..d35039a 100644
--- a/convert.py
+++ b/convert.py
@@ -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]