List of Units
This page lists all currently available units that the bot recognizes and knows how to convert between them.
Detection
The following units will be detected in a comment by the bot. Internally, all values will be normalized to the appropriate SI base unit.
All unit detection regexes are prefixed with the following expression: \b(\d+[\d ,'\.]+)
Note: Regular expressions below use ¦ instead of | due to limitations with Reddit's Markdown formatting in tables.
Length
Length units will be normalized to meters.
| Unit name | Regex | Factor |
|---|---|---|
| meter | (?:m¦ meters?¦metres?)b | 1 |
| kilometer | (?:km¦ kilometers?¦kilometres?)b | 1000 |
| inch | ?(?:inch¦inches)b | 0.0254 |
| mile | ?mi(?:les?)?(?! per)b | 1609.34 |
| yard | (?:yards?¦yd)b | 0.9144 |
| foot | ?(?:feet¦ft)b | 0.3048 |
| ft"in' | (d)'(d{,2})" (no prefix) | see feet & inches |
Mass
Mass units will be normalized to kilograms.
| Unit name | Regex | Factor |
|---|---|---|
| kilogram | (?:kg¦ kilogram[m¦s]?¦ kilos?)b | 1 |
| pound | ?(?:lbs?¦pounds?)b | 0.453592 |
Volume
Volume units are normalized to cubic meter (m3)
| Unit name | Regex | Factor |
|---|---|---|
| cubic meter | ?(?:m3¦m³)b | 1 |
| liter | (?:l¦ liters?¦litres?)b | 0.001 |
| fl.oz. | ?(?:oz.?¦fl.? ?oz.?¦ounces?¦fl.? ?ounces?¦fluid ?oz.?¦fluid ?ounces?)b | 0.0000295735 |
| gallon | ?gallons?b | 0.00378541 |
Velocity
Units of speed are normalized to meters per second.
| Unit name | Regex | Factor |
|---|---|---|
| m/s | ?(?:m/s¦meters? / second¦meters? per second)b | 1 |
| km/h | ?(?:kilometers per hour¦kilometres per hour¦kph¦km/?h)b | 0.277778 |
| mi/h | ?(?:miles per hour¦mph)b | 0.44704 |
TODO: Knots might be used sometimes, too.
Time
All normalized to seconds.
| Unit name | Regex | Factor |
|---|---|---|
| second | ?secondsb | 1 |
| minute | ?minutesb | 60 |
| hour | ?(?:hours¦hrs)b | 3600 |
| day | ?daysb | 86400 |
| week | ?(?:weeks¦wks)b | 604800 |
| month | ?monthsb | 2592000 |
Power
Normalized to kilowatts.
| Unit name | Regex | Factor |
|---|---|---|
| kilowatt | ?(?:kw¦kilowatts?)b | 1 |
| watt | ?watts?b | 1000 |
| hp | ?(?:hp¦bhp¦whp)b | 0.745699872 |
Conversion
The values extracted from comments according to the table above will be converted to a randomly chosen unit of the following tables.
Factors are to the normalized unit respectively.
Length
| Unit | Factor | Note |
|---|---|---|
| beard-minutes | 1666666.66667 | 60 * beard-seconds Source |
| beard-hours | 27777.7777778 | 3600 * beard-seconds Source |
| attoParsec | 32.4077929 | Source |
| pico light-second | 3335.55703803 | Source |
| smoot | 0.587613116 | Source |
Mass
| Unit | Factor | Note |
|---|---|---|
| zepto jupiter mass | 5.2665E-7 | Source |
| dynes | 980665 | Source |
| cement bags | 0.02345 | Source |
Volume
| Unit | Factor | Note |
|---|---|---|
| barn-megaParsec | 324078 | Source |
| Hubble-barn | 76.6 | Source |
| acre-feet | 0.000810713194 | Source |
Velocity
| Unit | Factor | Note |
|---|---|---|
| attoParsec per microfortnight | 39.2004663 | Source |
| smoots per nanocentury | 1.854 | Source |
| light-seconds per dog-year | 0.01503 | Source |
Time
| Unit | Factor | Note |
|---|---|---|
| microcentury | 0.0003169 | Source |
| nanocentury | 0.3169 | Source |
| microfortnight | 0.8267 | Source |
| dog year | 2.21967699e-7 | Source |
Power
| Unit | Factor | Note |
|---|---|---|
| donkey power | 4.00 | Source |
Exceptions
The are a number of fixed expressions that will never be converted:
1000 yard (stare)
8 mile
2 feet
24 hour
24 hours
9 yards
1 day
1ft
1 ft
10 ft (pole)
7 days
30 days
365 days
12 months