2.7.0
This version of SoulverCore has been built for Swift 6 with Xcode 16
New Functions
Data Transfer Functions
New function makes it easier to work out how long files will take to download or upload.
- "time to 3GB at 10 MB/s" (= 300 s)
- Or specify an explicit unit: "minutes to 35GB at 200MB/s" (= 2.92 min)
Speeding Up Time Functions
New function to speed up time by a multiplier:
- "1 hour 30 minutes at 1.5x" (= 1 hour)
You can also calculate the time saved:
- "time saved 1 hour 30 minutes at 1.5x" (= 30 minutes)
Financial Functions
Added a new function for working out how much money you need in the bank to ensure a certain amount of interest:
- "deposit needed for $42k/year at 7.5%" (= $560k)
- "savings required for $10k/month @ 5.6% (=$2.143M)
Added additional variants for compounding monthly and quarterly:
- "interest on $100 after 3 years at 10% compounding monthly"
- "interest on $100 for 3 years at 10% compounding quarterly"
Percentage functions
New functions to display the percentage change from one number by an amount
- "3k on 50k" (= 6%)
- "50 off 150" (= 33%)
Lunar day
- Get the current lunar day: "lunar day" or "moon day"
- Or the lunar day on a particular date: "lunar day on March 12, 2025"
Units
- Added support for unit expressions with a fractional value, like "1 1/2 pounds"
- Added cubic micrometer & square nanometer units
- Improved behaviour of certain unit multiplications, where they would not return in the most relevant form: "3 min × 15 mph" now returns "0.75 mi" rather than 1,207 m
Currencies
- Polygon symbol (formally MATIC) updated to POL
- Added sub-domination ETH currencies: Wei and Gwei
Conversions
- Support for automatic conversion of units without explicit value: "usd eur" will be interpreted as "1 usd in eur"
- More flexible unit conversion for ostensibly incompatible units: "3 mph to minutes" (convert to miles/minute), "10 cubic centimeters to meters" (convert to cubic meters)
- Support for conversion from & into imperial volume units explicitly, like "1 liter in imperial pints"
Other
General
- Added power phrase functions like: "3 to the power of 9", "4 raised to 5"
- Support for min/max functions with percentages
- Combination and permutation functions now support numerically larger parameters
- Added additional trigonometry functions that take their parameter in degrees: "asind", "acosd", "atand" and "tand"
- Added (sample) standard deviation function: "standard deviation of 10, 20, 30 and 40"
- You can also use "std dev of …" as a shorthand
Time zones
- Support for "Korea" as an alias of "South Korea"
Bug fixes
- Fixed a date parsing issue where a number like "1.003.020" was being misinterpreted as a date ("01.03.20")
- Fixed a lexing issue with feet units that are written with a trailing apostrophe, like 30.334'
- Fixed an issue with min/max list functions and negative currencies
API
Breaking changes
- We're working towards only depending on API available in the modern Swift FoundationEssentials & FoundationInternationalization,
- This version takes the first step in this direction by weaning off uses of
NS
prefixed classes (NSNumber
,NSString
,NSRegularExpression
etc). - For our public API, this change only affects the
range
property onToken
:- It is now typed to a similar
Token.Range
struct, ratherNSRange
. - You can still get an
NSRange
for a token if needed usingtoken.range.nsRange
- It is now typed to a similar
ECBCurrencyRateProvider
now uses swift async/await for rate updates, rather than a closure.
Parsing options
- Added a
DateParsingOptions
toEngineFeatureFlags
that lets you specify the default time for dates without times (either midday or midnight)
Places
- Cites, airports and countries now offer a 2-letter ISO country code property