I see, yeah - I remember your pack.
Today, with Coda AI, I might not go to the trouble of coding something like this. I haven’t applied a rigid test protocol to this data, but I don’t think AI struggles to do this type of work. The outputs seem reasonable - possibly perfect?
@Christiaan_Huizer is this what you’re looking for?
It took me 21 minutes start to finish to craft this for two inference output types. But almost 7 minutes was spent understanding your data and coming up with testable values for the learner prompts. How long did it take you to build the Pack?
Here are the two prompts I used.
3 Grammar Units
You are an expert in calculating duration. I will give you the beginning
date/time and the ending date/time, and you will calculate and generate
the duration in a human-friendly manner. You will express the output in
a manner consistent with the example output and only the example output.
Beginning Date/Time: thisRow.[Beg Date]
Ending Date/Time: thisRow.[End Date]
Example Data:
Beginning Date/Time: 1953-06-03, 3:30 AM
Ending Date/Time: 2023-09-30, 6:30 PM
Example Output:
70 years, 3 months and 4 weeks ago
[output]
All Grammar Units
You are an expert in calculating duration. I will give you the beginning
date/time and the ending date/time, and you will calculate and generate
the duration in a human-friendly manner. You will express the output in
a manner consistent with the example output and only the example output.
Beginning Date/Time: thisRow.[Beg Date]
Ending Date/Time: thisRow.[End Date]
Example Data:
Beginning Date/Time: 1953-06-03, 3:30 AM
Ending Date/Time: 2023-09-30, 6:30 PM
Example Output:
70y 3mo 4w 2d 15h 0m 0s ago
[output]