SoulverCore Versions Save

A powerful Swift framework for evaluating natural language math expressions

2.4.2

8 months ago

General

  • Support for dividing hex & binary numbers by other hex and binary numbers (previously only division by decimal was supported)

LineCollection

  • Support for JavaScript evaluating subsheets

Bug fixes

  • Fixed an issue with some clock times in date intervals that use decimal points (like 11.55am - 3.35pm)

2.4.1

8 months ago
  • The SoulverCore.xcframework is now code signed with an Apple Developer Program identity
    • This can be verified directly in Xcode 15

Soulver Core Verification

2.4.0

8 months ago

General

  • Added documentation to SoulverCore with DocC
    • Archive ready for import into Xcode or Dash is available here or online
  • This release includes some modifications to the API surface exposed by SoulverCore
    • Some non-essential APIs have been removed
    • Some types have been nested
    • These changes did not result in any changes being required to the sample project in this repo, and should not affect most clients

Weather functions

  • Support for natural language live weather queries (see the weatherDataProvider property on EngineCustomization)
  • 22 different weather metrics are supported (the same number of metrics offered by WeatherKit

Currency conversions

  • Support for explicitly setting the rate for a currency conversion (i.e "30 AUD in USD at 0.54 USD/AUD")

Regular functions

  • Support for single parameter functions without parenthesis: "sin 30", "floor 9.5"

Calendar math & timezones

  • Support for "time from (date) to (date)" style expressions (that return a time span, rather than a single unit)
  • Support for names and abbreviations of US & Australian states in timezone queries (like "time in nsw")

Units

  • New "nano" units: cubic nanometers and nanoliters
  • Support for lowercase "l" (+ "dl", "cl", "kl", etc) as aliases for liters in English localization
  • Added additional decimal places to the ounces unit definition
  • Fixed an issue with the definition of the micromoles unit

Financial calculations

  • Add variant of the compound interest function that compounds quarterly

2.3.4

10 months ago

Bug fixes

  • Fixed a bug where a unary minus would not be correctly interpreted in a rare case

2.3.3

11 months ago

Dates & Times

  • Added an additional date interval phrase, i.e: "now until next thursday"

Rates

  • Fixed an issue with certain rate multiplications involving fuel efficiency units

2.3.2

1 year ago

Improvements

  • Added sind and cosd functions that take degrees (rather than radians)
  • Added additional percentage change function syntaxes ("% increase/decrease/change from 10 to 20" = 100%)

Bug fixes

  • Fixed an issue where 2pi/1 was interpreted as a fraction (like 3 3/4)

2.3.1

1 year ago

Improvements

  • Added a new word function for linear change over time: "time from 50k to 100k at 5k every week" (= 10 weeks)
  • Special logic to handle the "TOP" currency so it doesn't interfere with natural language uses of the word "top"

Bug fixes

  • Fixed an issue where lowercase timezone abbreviations were not respecting the preferActiveTimeZoneAbbreviations flag
  • Corrected the coordinates for 4 UK based cities

2.3.0

1 year ago

New Localizations

  • Spanish
  • French

Timezone Calculations

  • New preferActiveTimeZoneAbbreviations on EngineFeatureFlags. With this option on, SoulverCore will automatically use the equivalent in-use timezone for when a timezone abbreviations that is not currently being observed is used. The default value is true.

Natural Language Date Parsing & Scheduling

  • The seeksFutureDate mode on EngineFeatureFlags has been upgraded to support unit shorthands like w for weeks and d for days. Also p and a can be used as shorthands for am and pm.
  • Added support for datestamps without spaces, like jul9.
  • Added a dateValue property on String to quickly extract a natural language date

Natural Language Function Parsing

  • Added a convenience static function on Calculator to quickly extract the parameters of a natural language custom function from a string. For example you could quickly extract the decimal 4.0 in the following function:
let parameters = Calculator.functionParametersIn("4 over 20", matching: ["3 over 9"]) // [4.0, 20.0]

Performance

  • Minor performance improvements

2.2.11

1 year ago

General

  • New percentage rate type: "50% / 3 years = 16.67% / year"
  • Support for "sin" as both an airport/timezone (Singapore) and function (sine)
  • Automatically round results from trigonometry functions to 15 dp to avoid floating point inaccuracies in certain results

Feature Flags

  • New option to make numbers with incorrectly placed thousands separators invalid allowsMisplacedThousandsSeparators on EngineFeatureFlags (the default is true)
  • With this option disabled, numbers like "1,3" in US-standard locales (where "," is a thousands separator) will not be recognised as "13"

Permutations & Combinations

  • New functions for permutations & combinations:
  • "5 choose 3", or "3 combinations of 5"
  • "10 permutation 3" or "3 permutations of 10"

Units & Currencies

  • Added additional aliases for some units

Dates & times

  • Added a "(timespan) until (month)" function, like "days until April".
  • Added a "(timespan) left in (month/year) function, like "days left in Feb", "days remaining in 2023"
  • "Sept" now works for September (in addition to "Sep")
  • Support for lowercase timezone abbreviations (gmt, pdt, etc)

Inflation

  • Added additional phrases:
  • "value of $500 in 2018" (convert from the present year)
  • "value of $500 from 2018" (convert to the present year)

2.2.10

1 year ago
  • Recognise and do arithmetic with dates in ISO8601
  • New unit range type (3-5 minutes)
  • Get the difference between two unit expressions using "to": 7.5kg to 36 kg (= 28.5 kg)
  • Fixed a bug with the "weekday next/last week" phrase