Skip to content

2.5.0

Compare
Choose a tag to compare
@zcohan zcohan released this 20 Feb 09:38

Calendar Calculations

Timespans

  • Added support for time spans expressed in two units "in minutes and seconds", "in hours and minutes", "in days and hours", "in weeks and days"
  • Support for "as time span" as a synonym for "as timespan"
  • Timespans, rather than single time units, are now used after more operations on single quantities of time
  • For example, "25 min / 12" = (2 min 5 second), "1h20m + 45m" = (2 hours 5 min)
  • We now use fixed time units (weeks, days, minutes, etc), not variable ones (years, months), when "as timespan" is specified for the result

Format dates using format patterns

  • For example, "March 12, 2023 as EEEE, MMM d, yyyy" (= Sunday, Mar 12, 2023)
  • Or "March 12, 2023 as MM/dd/yy" (= 03/12/23)
  • The pattern language is defined by the Unicode Technical Standard #35
  • Here is a good cheat sheet (RIP Alex Hay)

Timezone codes

  • Added a new TimezoneCodeCorrectionBehavior enum that can be used on an EngineFeatureFlags on an EngineCustomization
  • This includes a new option to only "correct" non-summer timezone codes

Other

  • Add support for dates with the form "13 March 23" (the year is assumed to be the (20)23, and the day 13)
  • Workaround an issue in Foundation's Calendar which sometimes interprets "Feb 29" as an invalid date (even in a leap year)

General

Pounds & ounces

  • New "Pounds & ounces" output format: "87 ounces" will return "5 lb 7 oz"
  • Explicitly convert with "in pounds and ounces" or "in lb oz"

Locales

  • Fixed an issue introduced in 2.4.7 where the . symbol was not being correctly interpreted as a decimal point in locales like French & Russian, in which this symbol is not defined as either a decimal point or thousands separator
  • Support for automatic 3 dp of accuracy in currency results, when used in locales like French and Russian: €12,995 - €1,747 = €11,248 (the result is 11, not 11 thousand)

Other

  • Support for applying SI scalars (k, M, G, etc) to sub-expressions (500)k and line references in LineCollection
  • With the variable declarations feature flag disabled, expressions that include the = symbol will no longer return results

Engine Configuration

EngineFeatureFlags (note: possibly source breaking change)

  • The EngineFeatureFlags object has been tidied up and certain flags removed
  • EngineFeatureFlags had become a bit of a catch-all object over time, with many legacy properties. We felt it was time to make it more friendly for newcomer to the framework, and also more ergonomic for everyone
  • It is unlikely you were using any of the removed feature flags. However, please email us or open a discussion a flag you were depending on is no longer available

Commenting

  • Added a new CommentingOptions object (set the commentingOptions property on LineCollection) to customize which commenting features you want to support in multi-line calculations
  • Calculator no longer supports commenting features (they continue to be available on LineCollection)