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

fix: datebetween formula

Open alaycock opened this issue 1 year ago • 1 comments

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

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
react-notion-x ✅ Ready (Inspect) Visit Preview Jan 13, 2025 2:56am
react-notion-x-minimal-demo ✅ Ready (Inspect) Visit Preview Jan 13, 2025 2:56am

vercel[bot] avatar Jan 03 '25 17:01 vercel[bot]

thanks @alaycock 🙏

transitive-bullshit avatar Sep 18 '25 06:09 transitive-bullshit