Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mattstein/alfred-datespan-workflow

Quickly calculate a date range with Alfred.
https://github.com/mattstein/alfred-datespan-workflow

alfred-workflow dates-and-times

Last synced: 2 months ago
JSON representation

Quickly calculate a date range with Alfred.

Awesome Lists containing this project

README

        

# Alfred Datespan Workflow

Get human-formatted date/time intervals with Alfred.

![Workflow screenshot](resources/screenshot.png)

Screenshot using the dark variant of my [custom theme](https://github.com/mattstein/alfred-theme).

## Installation

Download the `.alfredworkflow` file from the [latest release](https://github.com/mattstein/alfred-datespan-workflow/releases) and double-click to install.

## Usage

Use this workflow to get the difference between two dates in Alfred. This relies exclusively on PHP’s [DateInterval](https://www.php.net/manual/en/dateinterval.format.php) method, which is happy to accept a variety of inputs and works pretty well!

Examples:

- `datespan tomorrow`: countdown in hours and minutes
- `datespan 10/10/10`: difference in years, months, days, hours, and minutes—along with total business weeks, weeks, days, hours, and minutes
- `datespan 3/10 to 5/12`: all units above, but the span between zero-hour on each date

You can use any format that [`strtotime`](https://php.net/manual/en/function.strtotime.php) can parse.