Date Span Alfred Workflow

April 2, 2014 1 min read

In an unprecedented frenzy of blogworthy activity, I’ve just created an Alfred workflow for quickly getting the range between two dates. After hours of contemplation, I decided to call it Date Span.

It uses PHP’s DateInterval to take a variety of datetime formats and output the range in various units. For example, give it a single date and it’ll calculate based on the current date and time:

Screenshot of Alfred using datespan keyword to return days, weeks, hours and minutes to 1/19/2038

Give it two dates (separated by to ) and it’ll calculate the difference between them:

Screenshot of Alfred using datespan keyword to display days, weeks, hours and minutes between two dates

And just because it’s friendly, it’ll remind you if the date is in the past:

Screenshot of Alfred displaying weeks, days, hours and minutes to a date in the past

I’m not thrilled with the icon I whipped up for it, and I’ve not tested my theoretical bash-centric guess at timezone detection. And PHP 5.3+ is required.

Enjoy, and please complain about anything that’s stupid!

Download DateSpan.alfredworkflow.zip or check it out on GitHub.

***

Tagged

Updated 10/14/19 at 7:23pm