feelin icon indicating copy to clipboard operation
feelin copied to clipboard

Duration constructor accepts weeks (unsupported in FEEL)

Open barmac opened this issue 1 year ago • 1 comments

Describe the Bug

The FEEL duration accepts years, months, days, and time. This does not include weeks, even though ISO8601 allows it. The overly support results in expressions which should result in null according to the FEEL spec, but they work fine in feelin.

Steps to Reproduce

https://nikku.github.io/feel-playground/?e=%7E3YCAkIDtgICAgICAgIC9AgCXnLAMiH3ETPlLql28AtuoufnzVGn0EWcp6S7ROtd6ssKVKZ3yv2XGPLxKZSQuxYWFiWvSMp2%2FuUaJ%2FyJMb7DpSC4VHMV1%2FYG0BBmaF%2Bn18Gb%2Ff0PkIIA%3D&c=%7E3YCAkIC%2BgICAgICAgIC9AgCXnLILCNLEWVvD4A7RTE6e5VQHnL67RAf8ffGpOTFExGjxp2lIHt%2Fmy8diAzMQSsxIFwmdegBxI7oRrX98i6CA&t=expression&st=true

Expected Behavior

The expression result should be null.

Environment

  • Host (Browser/Node version), if applicable: [e.g. MS Edge 18, Chrome 69, Node 10 LTS]
  • OS: [e.g. Windows 7]
  • Library version: [e.g. 2.0.0]

barmac avatar Jan 15 '25 09:01 barmac

Thanks! This is because we insufficiently tell apart date time from date values within the interpreter. Fixing that would address https://github.com/nikku/feelin/issues/49, too.

nikku avatar Jan 15 '25 11:01 nikku