Is it possible to style a duration datafield to show both the number and the word for the number like “5 (five) days”?
This is currently only supported for currencies and (integer/floating point) numbers. But it’s a good question, I’ll add it to the roadmap.
This is a temporary workaround, but it’s quite ugly, so it’s more like an academic exercise (and a good motivation to prioritize this item on the roadmap!)
(it essentially checks which type of duration it is — days / weeks / months —, then extracts the number and adds the singular or plural)
{@is-days(#concept^duration): @dynamic-fullnr(@days-in(#concept^duration)) @one-else(#concept^duration, "day", "days") | @is-weeks(#concept^duration): @dynamic-fullnr(@weeks-in(#concept^duration)) @one-else(#concept^duration, "week", "weeks") | ..etc...}
OK this workaround made me laugh! IMHO it’s a weird convention to put the words for the number after the actual number but some lawyers like it so who are we to question it? (lol). I’m curious - do you know why that convention evolved and if it’s still in vogue?
You should assume that everything inside the software, is there for a very good reason — i.e., that at least one of our users explicitly asked for it. You wouldn’t believe (I didn’t initially…) how much diversity exists in the legal world, across jurisdictions.
I’m sorry, I think you misunderstood. I do assume everything is there for a reason. I’ve had 40 years’ experience with lawyers and firms all over the world so I do understand the variety that’s out there. I was just asking if you knew why that weird convention of following a number with it’s word came to be in the legal world.
I should have used an emoticon
I can’t find the source right now but I always understood that this convention originated from drafting by hand. In order to ensure that no confusion arose because of illegible handwriting, a number would be written out completely like this.
Very telling that the precedent-oriented nature of lawyers and the legal drafting process would allow a practice like this to survive when it no longer makes sense
Coming back to the technical side, I actually made a mistake when answering your question initially.
The feature you are looking for, is not yet implemented for @dynamic-fullnr
— which I too quickly assumed you were looking for — but is actually already implemented for durations when the right styling setting is activated. (I just happened that I was testing it in a test environment for a different jurisdiction, where it was actively disabled.)
You simply have to enable this styling setting, and duration fields/values (as well as numbers and currencies) will automatically be shown in the right style.
Unlike durations, you do have to explicitly wrap a number / currency in @dynamic-fullnr
, even when the styling setting above is activated. The rationale is that in a typical contract, there will be a mix of many simple numbers where you do not want to display in this lengthy format, while there will be other instances where you do want it.
Perfect, thanks!