Is it possible to return the minute until a time string?

Hello all,

I have this AppleScript:

    tell application "Reminders"
    		set remTime to the (remind me date of the first reminder of list "Focus")
    		set focusRem to (time string of (remTime))
    		return focusRem
    	end try
    end tell

An example of what it returns: “10:00:56 AM”

Can I return the time as minutes until, based on the current time?

For example, if the remind me date of the reminder is 10:00am, and the actual time is 9:45am, I want to return: “15 minutes” (just the minutes, no seconds)

I am at a loss on how to do the above. Any help is appreciated.

Hey Jim,

Something like this:

set currentDate to current date

tell application "Reminders"
   set remTime to the (remind me date of the last reminder of list "Test List 01")
end tell

if remTime > currentDate then
   set minutesUntilReminder to (remTime - currentDate) div 60
   error "Reminder Time Discrepency!"
end if


Thank you so much @ccstone !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.