react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

fix: datebetween formula

Open alaycock opened this issue 10 months ago • 1 comments
trafficstars

Description

A few formulas appear to be broken because the wrong argument is being used to determine the unit. Additionally, intervalToDuration only returns a property if it has truthy value, despite what the docs indicate. In the case that the seconds value is zero, the returned object will not have a seconds property defined.

Fixes are:

  • Use the correct unit argument
  • Default the duration to zero if the result from intervalToDuration is undefined.

Notion Test Page ID

I have a working formula using dateBetween on this page: https://adaminthehills.notion.site/Hi-I-m-Adam-164d424ea49f80c9b216c4425ca573c8

alaycock avatar Jan 03 '25 17:01 alaycock