Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/mattstein/alfred-datespan-workflow
- Owner: mattstein
- License: mit
- Created: 2014-04-10T15:29:06.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-09-24T16:43:47.000Z (3 months ago)
- Last Synced: 2024-10-08T22:34:32.660Z (3 months ago)
- Topics: alfred-workflow, dates-and-times
- Language: PHP
- Homepage:
- Size: 1.35 MB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
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 dateYou can use any format that [`strtotime`](https://php.net/manual/en/function.strtotime.php) can parse.