Shortcut question: how do I “round” my ETA?

I’m trying to come up with an ETA shortcut that will say things like “I’ll be there in about 20 minutes” rather than “I’ll be there in 18 minutes.”

I’ve tried a bunch of options but none of them seem to work.

“Adjust Date” gives me “I’ll be there at 1:13pm” rather than “18 minutes” which is just another formatting problem I’d rather avoid (I’d say “about 1:15pm”).

“Round number” seems to adjust seconds not the minutes, which doesn’t really help at all.

What I want to do is round 18 to 20, or 12 to 15, or 27 to 30.

So I guess I want my time estimates to end with 0 or 5 and be “minutes from now” not “this specific time”.

I have no idea how to do that, if it can be done.

So this is a hacky approach and will only work if you get minutes back:

https://www.icloud.com/shortcuts/3ec5933aadae427fb6947493aeb02d49

Here’s a different approach that works with the seconds to give you the complete time:

https://www.icloud.com/shortcuts/f59d649fa7ad40828ec92444d4bf4f3c

2 Likes

Try this:

https://www.icloud.com/shortcuts/15861576a68c4a328c198ce00fe1bcc9

1 Like

Thank you both very much! These are really helpful to learn some new techniques.

1 Like

I converted the duration into text and then used regular expressions to extract the number of minutes. I was totally surprised to see in your example, Rose, that searching for “minutes” returns the number instead of returning the word “minutes”!