Skip to content

Commit

Permalink
feat(length): add US survey foot unit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Apr 24, 2024
1 parent 1ceefb3 commit 25e1d47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export type _UnitsByMeasureRaw = {
2: 'bit' | 'bits' | 'b' | 'pebibit' | 'pebibits' | 'Pib' | 'tebibit' | 'tebibits' | 'Tib' | 'gibibit' | 'gibibits' | 'Gib' | 'mebibit' | 'mebibits' | 'Mib' | 'kibibit' | 'kibibits' | 'Kib' | 'Kb' | 'KB' | 'petabit' | 'petabits' | 'Pb' | 'terabit' | 'terabits' | 'Tb' | 'gigabit' | 'gigabits' | 'Gb' | 'megabit' | 'megabits' | 'Mb' | 'kilobit' | 'kilobits' | 'kb' | 'hectobit' | 'hectobits' | 'hb' | 'decabit' | 'decabits' | 'dab' | 'decibit' | 'decibits' | 'db' | 'centibit' | 'centibits' | 'cb' | 'millibit' | 'millibits' | 'mb' | 'microbit' | 'microbits' | 'μb' | 'µb' | 'nanobit' | 'nanobits' | 'nb' | 'picobit' | 'picobits' | 'pb' | 'femtobit' | 'femtobits' | 'fb' | 'nibble' | 'nibbles' | 'semioctet' | 'semioctets' | 'halfbyte' | 'halfbytes' | 'byte' | 'bytes' | 'octect' | 'octects' | 'B' | 'pebibyte' | 'pebibytes' | 'PiB' | 'tebibyte' | 'tebibytes' | 'TiB' | 'gibibyte' | 'gibibytes' | 'GiB' | 'mebibyte' | 'mebibytes' | 'MiB' | 'kibibyte' | 'kibibytes' | 'KiB' | 'petabyte' | 'petabytes' | 'PB' | 'terabyte' | 'terabytes' | 'TB' | 'gigabyte' | 'gigabytes' | 'GB' | 'megabyte' | 'megabytes' | 'MB' | 'kilobyte' | 'kilobytes' | 'kB' | 'hectobyte' | 'hectobytes' | 'hB' | 'decabyte' | 'decabytes' | 'daB' | 'decibyte' | 'decibytes' | 'dB' | 'centibyte' | 'centibytes' | 'cB' | 'millibyte' | 'millibytes' | 'mB' | 'microbyte' | 'microbytes' | 'μB' | 'µB' | 'nanobyte' | 'nanobytes' | 'nB' | 'picobyte' | 'picobytes' | 'pB' | 'femtobyte' | 'femtobytes' | 'fB' | 'hextet' | 'hextets';
3: 'joule' | 'joules' | 'J' | 'petajoule' | 'petajoules' | 'PJ' | 'terajoule' | 'terajoules' | 'TJ' | 'gigajoule' | 'gigajoules' | 'GJ' | 'megajoule' | 'megajoules' | 'MJ' | 'kilojoule' | 'kilojoules' | 'kJ' | 'hectojoule' | 'hectojoules' | 'hJ' | 'decajoule' | 'decajoules' | 'daJ' | 'decijoule' | 'decijoules' | 'dJ' | 'centijoule' | 'centijoules' | 'cJ' | 'millijoule' | 'millijoules' | 'mJ' | 'microjoule' | 'microjoules' | 'μJ' | 'µJ' | 'nanojoule' | 'nanojoules' | 'nJ' | 'picojoule' | 'picojoules' | 'pJ' | 'femtojoule' | 'femtojoules' | 'fJ' | 'watt-hour' | 'W⋅h' | 'W h' | 'Wh' | 'petawatt-hour' | 'petawatt-hours' | 'PW⋅h' | 'PW h' | 'PWh' | 'terawatt-hour' | 'terawatt-hours' | 'TW⋅h' | 'TW h' | 'TWh' | 'gigawatt-hour' | 'gigawatt-hours' | 'GW⋅h' | 'GW h' | 'GWh' | 'megawatt-hour' | 'megawatt-hours' | 'MW⋅h' | 'MW h' | 'MWh' | 'kilowatt-hour' | 'kilowatt-hours' | 'kW⋅h' | 'kW h' | 'kWh' | 'hectowatt-hour' | 'hectowatt-hours' | 'hW⋅h' | 'hW h' | 'hWh' | 'decawatt-hour' | 'decawatt-hours' | 'daW⋅h' | 'daW h' | 'daWh' | 'deciwatt-hour' | 'deciwatt-hours' | 'dW⋅h' | 'dW h' | 'dWh' | 'centiwatt-hour' | 'centiwatt-hours' | 'cW⋅h' | 'cW h' | 'cWh' | 'milliwatt-hour' | 'milliwatt-hours' | 'mW⋅h' | 'mW h' | 'mWh' | 'microwatt-hour' | 'microwatt-hours' | 'μW⋅h' | 'µW⋅h' | 'μW h' | 'µW h' | 'μWh' | 'µWh' | 'nanowatt-hour' | 'nanowatt-hours' | 'nW⋅h' | 'nW h' | 'nWh' | 'picowatt-hour' | 'picowatt-hours' | 'pW⋅h' | 'pW h' | 'pWh' | 'femtowatt-hour' | 'femtowatt-hours' | 'fW⋅h' | 'fW h' | 'fWh';
4: 'newton' | 'newtons' | 'N' | 'petanewton' | 'petanewtons' | 'PN' | 'teranewton' | 'teranewtons' | 'TN' | 'giganewton' | 'giganewtons' | 'GN' | 'meganewton' | 'meganewtons' | 'MN' | 'kilonewton' | 'kilonewtons' | 'kN' | 'hectonewton' | 'hectonewtons' | 'hN' | 'decanewton' | 'decanewtons' | 'daN' | 'decinewton' | 'decinewtons' | 'dN' | 'centinewton' | 'centinewtons' | 'cN' | 'millinewton' | 'millinewtons' | 'mN' | 'micronewton' | 'micronewtons' | 'μN' | 'µN' | 'nanonewton' | 'nanonewtons' | 'nN' | 'piconewton' | 'piconewtons' | 'pN' | 'femtonewton' | 'femtonewtons' | 'fN' | 'dyne' | 'dynes' | 'dyn' | 'pound of force' | 'pound-force' | 'lbf' | 'kip' | 'klb' | 'kipf' | 'klbf' | 'poundal' | 'poundals' | 'pdl' | 'kilogram-force' | 'kilopond' | 'kiloponds' | 'kgf' | 'kp' | 'tonne-force' | 'metric ton-force' | 'megagram-force' | 'megapond' | 'tf' | 'Mp';
5: 'meter' | 'meters' | 'metre' | 'metres' | 'm' | 'petameter' | 'petametre' | 'petameters' | 'petametres' | 'Pm' | 'terameter' | 'terametre' | 'terameters' | 'terametres' | 'Tm' | 'gigameter' | 'gigametre' | 'gigameters' | 'gigametres' | 'Gm' | 'megameter' | 'megametre' | 'megameters' | 'megametres' | 'Mm' | 'kilometer' | 'kilometre' | 'kilometers' | 'kilometres' | 'km' | 'hectometer' | 'hectometre' | 'hectometers' | 'hectometres' | 'hm' | 'decameter' | 'decametre' | 'decameters' | 'decametres' | 'dam' | 'decimeter' | 'decimetre' | 'decimeters' | 'decimetres' | 'dm' | 'centimeter' | 'centimetre' | 'centimeters' | 'centimetres' | 'cm' | 'millimeter' | 'millimetre' | 'millimeters' | 'millimetres' | 'mm' | 'micrometer' | 'micrometre' | 'micrometers' | 'micrometres' | 'μm' | 'µm' | 'nanometer' | 'nanometre' | 'nanometers' | 'nanometres' | 'nm' | 'picometer' | 'picometre' | 'picometers' | 'picometres' | 'pm' | 'femtometer' | 'femtometre' | 'femtometers' | 'femtometres' | 'fm' | 'foot' | 'feet' | 'ft' | '\'' | 'inch' | 'inches' | 'in' | '\"' | 'yard' | 'yards' | 'yd' | 'mile' | 'miles' | 'mi' | 'nautical mile' | 'nautical miles' | 'M' | 'NM' | 'nmi' | 'light-year' | 'light-years' | 'ly' | 'pica' | 'picas' | 'pc' | 'point' | 'points';
5: 'meter' | 'meters' | 'metre' | 'metres' | 'm' | 'petameter' | 'petametre' | 'petameters' | 'petametres' | 'Pm' | 'terameter' | 'terametre' | 'terameters' | 'terametres' | 'Tm' | 'gigameter' | 'gigametre' | 'gigameters' | 'gigametres' | 'Gm' | 'megameter' | 'megametre' | 'megameters' | 'megametres' | 'Mm' | 'kilometer' | 'kilometre' | 'kilometers' | 'kilometres' | 'km' | 'hectometer' | 'hectometre' | 'hectometers' | 'hectometres' | 'hm' | 'decameter' | 'decametre' | 'decameters' | 'decametres' | 'dam' | 'decimeter' | 'decimetre' | 'decimeters' | 'decimetres' | 'dm' | 'centimeter' | 'centimetre' | 'centimeters' | 'centimetres' | 'cm' | 'millimeter' | 'millimetre' | 'millimeters' | 'millimetres' | 'mm' | 'micrometer' | 'micrometre' | 'micrometers' | 'micrometres' | 'μm' | 'µm' | 'nanometer' | 'nanometre' | 'nanometers' | 'nanometres' | 'nm' | 'picometer' | 'picometre' | 'picometers' | 'picometres' | 'pm' | 'femtometer' | 'femtometre' | 'femtometers' | 'femtometres' | 'fm' | 'foot' | 'feet' | 'ft' | '\'' | 'US survey foot' | 'US survey feet' | 'U.S. survey foot' | 'U.S. survey feet' | 'inch' | 'inches' | 'in' | '\"' | 'yard' | 'yards' | 'yd' | 'mile' | 'miles' | 'mi' | 'nautical mile' | 'nautical miles' | 'M' | 'NM' | 'nmi' | 'light-year' | 'light-years' | 'ly' | 'pica' | 'picas' | 'pc' | 'point' | 'points';
6: 'gram' | 'grams' | 'g' | 'petagram' | 'petagrams' | 'Pg' | 'teragram' | 'teragrams' | 'Tg' | 'gigagram' | 'gigagrams' | 'Gg' | 'megagram' | 'megagrams' | 'Mg' | 'kilogram' | 'kilograms' | 'kg' | 'hectogram' | 'hectograms' | 'hg' | 'decagram' | 'decagrams' | 'dag' | 'decigram' | 'decigrams' | 'dg' | 'centigram' | 'centigrams' | 'cg' | 'milligram' | 'milligrams' | 'mg' | 'microgram' | 'micrograms' | 'μg' | 'µg' | 'nanogram' | 'nanograms' | 'ng' | 'picogram' | 'picograms' | 'pg' | 'femtogram' | 'femtograms' | 'fg' | 'tonne' | 'tonnes' | 'metric ton' | 'metric tons' | 't' | 'kilotonne' | 'kilotonnes' | 'kt' | 'megatonne' | 'megatonnes' | 'Mt' | 'gigatonne' | 'gigatonnes' | 'Gt' | 'pound' | 'pounds' | 'lb' | 'stone' | 'stones' | 'st' | 'ounce' | 'ounces' | 'oz' | 'short ton' | 'short tons' | 'US ton' | 'US tons' | 'long ton' | 'long tons' | 'imperial ton' | 'imperial tons' | 'displacement ton' | 'displacement tons';
7: 'watt' | 'watts' | 'W' | 'petawatt' | 'petawatts' | 'PW' | 'terawatt' | 'terawatts' | 'TW' | 'gigawatt' | 'gigawatts' | 'GW' | 'megawatt' | 'megawatts' | 'MW' | 'kilowatt' | 'kilowatts' | 'kW' | 'hectowatt' | 'hectowatts' | 'hW' | 'decawatt' | 'decawatts' | 'daW' | 'deciwatt' | 'deciwatts' | 'dW' | 'centiwatt' | 'centiwatts' | 'cW' | 'milliwatt' | 'milliwatts' | 'mW' | 'microwatt' | 'microwatts' | 'μW' | 'µW' | 'nanowatt' | 'nanowatts' | 'nW' | 'picowatt' | 'picowatts' | 'pW' | 'femtowatt' | 'femtowatts' | 'fW' | 'horsepower' | 'mechanical horsepower' | 'hp';
8: 'pascal' | 'pascals' | 'Pa' | 'petapascal' | 'petapascals' | 'PPa' | 'terapascal' | 'terapascals' | 'TPa' | 'gigapascal' | 'gigapascals' | 'GPa' | 'megapascal' | 'megapascals' | 'MPa' | 'kilopascal' | 'kilopascals' | 'kPa' | 'hectopascal' | 'hectopascals' | 'hPa' | 'decapascal' | 'decapascals' | 'daPa' | 'decipascal' | 'decipascals' | 'dPa' | 'centipascal' | 'centipascals' | 'cPa' | 'millipascal' | 'millipascals' | 'mPa' | 'micropascal' | 'micropascals' | 'μPa' | 'µPa' | 'nanopascal' | 'nanopascals' | 'nPa' | 'picopascal' | 'picopascals' | 'pPa' | 'femtopascal' | 'femtopascals' | 'fPa' | 'bar' | 'bars' | 'petabar' | 'petabars' | 'Pbar' | 'terabar' | 'terabars' | 'Tbar' | 'gigabar' | 'gigabars' | 'Gbar' | 'megabar' | 'megabars' | 'Mbar' | 'kilobar' | 'kilobars' | 'kbar' | 'hectobar' | 'hectobars' | 'hbar' | 'decabar' | 'decabars' | 'dabar' | 'decibar' | 'decibars' | 'dbar' | 'centibar' | 'centibars' | 'cbar' | 'millibar' | 'millibars' | 'mbar' | 'microbar' | 'microbars' | 'μbar' | 'µbar' | 'nanobar' | 'nanobars' | 'nbar' | 'picobar' | 'picobars' | 'pbar' | 'femtobar' | 'femtobars' | 'fbar' | 'torr' | 'torrs' | 'Torr' | 'millitorr' | 'mTorr' | 'atmosphere' | 'atmospheres' | 'atm' | 'pound per square inch' | 'pounds per square inch' | 'psi' | 'lbf/in2' | 'lbf/in²';
Expand Down
4 changes: 4 additions & 0 deletions src/conversions/measures/length.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const length: Measure = {
...expandMacro(Macros.si, { names: ['meter', 'metre', 'meters', 'metres'], symbols: ['m'], ratio: 1 }),

{ names: ['foot', 'feet'], symbols: ['ft', "'"], ratio: 0.3048 },
{
names: ['US survey foot', 'US survey feet', 'U.S. survey foot', 'U.S. survey feet'],
ratio: new BigNumber(1200).div(3937),
},
{ names: ['inch', 'inches'], symbols: ['in', '"'], ratio: 0.0254 },
{ names: ['yard', 'yards'], symbols: ['yd'], ratio: 0.9144 },
{ names: ['mile', 'miles'], symbols: ['mi'], ratio: 1609.344 },
Expand Down

0 comments on commit 25e1d47

Please sign in to comment.