Skip to content

Releases: soulverteam/SoulverCore

2.4.5

13 Jan 10:50
Compare
Choose a tag to compare

Special days in calendar calculations

This version adds support for special widely celebrated cultural events in calendar calculations, including:

  • Christmas eve
  • Christmas day
  • Boxing day
  • New year's eve
  • New year's day
  • Good Friday
  • Easter Sunday
  • St. Valentine's day
  • Halloween
  • Black Friday
  • Thanksgiving
  • Chinese New Year
  • Ramadan (start and end)

Use special days in calendar calculations, like "days until xmas", "black friday last year", "chinese new year 2025", "this easter", etc.

They are especially helpful for working with events like Easter, Ramadan and Chinese New Year that tend to change their date every year.

Timezones

  • Support for short US timezone aliases: "pt" (pacific time), "mt" (mountain time), "ct" (central time) and "et" (eastern time).
  • Added missing "Nevada" & "Las Vegas" timezones
  • Fixed an issue where "New York" was referring to the state ("New York State"), rather than the city

Scheduling

  • Support "Friday at 18" style expressions in future date seeking mode (with the am/pm omitted, and support for 24 hours)
  • 1-5 will assume pm, and 6-11 am, i.e "Friday at 7" will be interpreted as 7am.

Operations on lists

  • Added "min" and "max" functions: "min of 5, 2 and 7" (= 2)
  • You can now use gcd and lcm functions on lists: "gcd 10, 20, 5" (= 5)

CSS

  • Rem/em/px units are formatted without a space now (i.e "3em"), so they can be immediately pasted into CSS files

General functions

  • Added a phrase to detect whether a number is prime: "is 7 prime" (= true)
  • Added a clamp function (value, min, max): "clamp 10 5 7" (= 7), or more verbosely "clamp 10 between 5 and 7)

Scientific notation

  • Support 1.0E+04 style scientific notation (with an uppercase E, previously only lowercase e was supported).

Currency Formatting Preferences

  • A new struct that can be used for more fine-grain control over how currencies are formatted
  • For example, you can use the new showTrailingZeros property to display a result of $1.00 as $1. This was not possible in previous releases.

Bug fixes

  • Fixed an issue that required Romanian Leu (RON) to be uppercased
  • Kilowatts * hours now correctly produces results in kilowatt hours: 1,800 kW * hours (= 1800 kWh)
  • Fixed an issue with multiplying MHz & GHz by time

2.4.4

09 Dec 04:22
Compare
Choose a tag to compare

Units

  • Added the rem css unit
  • Added a fontBaseSize property on EngineCustomization that can be used to customize the definition of the rem and em units

Dates & Times

  • Added a time ago in location phrase, i.e. "4 hours ago in nyc"

Bug fixes

  • Fixed the GPS location of Birmingham

Error handling

  • There is a new impreciseResult error type.
    Numbers larger than 37 significant digits cannot fit into Foundation's Decimal type, and doing certain operations on them which require more precision than this will fail (like mod)

Utilities

  • New utility classes for doing operations on CalculationResult objects (adding, subtracting, negating, etc)

2.4.3

27 Oct 11:48
Compare
Choose a tag to compare

Constants

  • Additional constants: "phi" (golden ratio), & "tau" (2π)

Bases

  • Support for octal (base-8) numbers, i.e: "0o120707 to decimal" (= 41231)

Scientific notation

  • Convert numbers into scientific notation using "in scientific notation", or "in sci", like "10,500 in sci" (= 1.05e4)
  • Additional notation thresholds have been added to SIThreshold

Converting length to pixels

  • New function for length to pixels conversion:
  • "1 cm in px @ 326 ppi" (= 128px)

API changes

  • Some options on EngineFeatureFlags have been moved into LineCollection, as they only apply to calculations over multiple lines.

2.4.2

06 Oct 14:13
Compare
Choose a tag to compare

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

29 Sep 17:12
Compare
Choose a tag to compare
  • 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

24 Sep 11:22
Compare
Choose a tag to compare

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

04 Aug 02:35
Compare
Choose a tag to compare

Bug fixes

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

2.3.3

24 Jun 05:58
Compare
Choose a tag to compare

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

01 May 09:07
Compare
Choose a tag to compare

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

11 Apr 08:48
Compare
Choose a tag to compare

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