Alfred workflow to convert a time to dynamic Discord timestamp

Overview

Whencord for Alfred

Takes a time string and converts it to a dynamic timestamp for sharing in Discord.

demo

Download

Download the latest release here.

Note: Written for Alfred 4+. Requires nodeJS to be installed.

Install NodeJS (if you don't already have it)

If you don't already have nodeJS installed, you'll need it to use Whencord. This is because Whencord uses moment.js (the same package Discord itself uses). I originally wrote Whencord using a similar PHP package but the relative time and localisation was not a close enough match. I could then have written the whole thing in NodeJS of course, but then we'd miss out on PHP's wonderful string to time conversion.

TL;DR: Install nodeJS. I'd generally recommend installing Homebrew. Then it's as simple as opening the terminal and running:

brew install nodejs

MacOS Monterey beta users: Some stock packages have been removed from MacOS Monterey; this includes php. If you are using MacOS Monterey, I'd generally recommend installing Homebrew. Then it's as simple as: brew install php.

Usage

  • wc — Convert a human readable time (PHP DateTime) to a dynamic timestamp
  • wc :
  • ⌘t — Quickly launch from Discord (Discord application must be the front most window)
    • uses text selection within Discord (if text is selected)

Choose a time format from the resulting list. The dynamic timestamp is copied to your clipboard and pasted into the front most application in MacOS.

Some usage examples:

  • wc tomorrow 2pm
  • wc today at 8pm*
  • wc 9.30pm (today at 9.30pm)
  • wc next Thursday 13:30
  • wc third weds June 2023 (the third Wednesday of June 2023)
  • 2021-02-23 14:00
  • 2021-02-23 2pm (same as the above)
  • 2021-08-15 23:40:44.720305+00:00
  • wc 3pm pdt (15:00 in the PDT timezone)
  • +9 hours (9 hours from now)
  • +2 hours 20 mins (2 hours and 20 minutes from now)
  • wc :1640433600 (unix timestamp)

For more examples of supported time strings and how to construct them, see the tables shown on the following pages for relative, time, date, and compound formats.

* Strictly speaking, the word at (e.g. tomorrow at 2pm) is not supported, but I decided to help by filtering this out of any input.

Configuration

There are only three variables in the workflow's configuration sheet; these are set automatically when you first run Whencord. You should not need to configure anything, but these options can be customised if you wish.

Option Meaning
locale This variable is auto-created to match your main system language, but can manually be set to any locale supported by moment.js.
nodePath This variable is auto-created to match the path to your nodejs binary, but can manually be set if you wish to use a different bin (e.g. /usr/local/bin/node or wherever you have it installed.)
localTimezone For local time, use a different timezone than your system clock. If left blank, your system timezone will be used automatically.

License

Alfred-Whencord is released under the MIT Licence.

Attribution

Credit to DJDavid98's HammerTime, which inspired me to bring the concept to an Alfred workflow.

You might also like...
PHP Discord Webcrawler to log all messages from a Discord Chat.
PHP Discord Webcrawler to log all messages from a Discord Chat.

Disco the Ripper was created to rip all messages from a Discord specific channel into JSON via CLI and help people to investigate some servers who has awkward channels before they get deleted.

A Discord bot that rewards players in Minecraft for sending messages on Discord

MCRewards-Discord-Bot A Discord bot that rewards players in Minecraft for sending messages on Discord How to setup: Download this git as a .zip, or cl

DiscordLookup | Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more...
DiscordLookup | Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more...

DiscordLookup Get more out of Discord with Discord Lookup! Snowflake Decoder, Guild List with Stats, Invite Info and more... Website Getting Help Tool

Allow any Discord user to sign in to your website and save their discord user information for later use.
Allow any Discord user to sign in to your website and save their discord user information for later use.

Simple Discord SSO ( Single Sign-On ) Requires at least: 5.0 Tested up to: 5.8.3 Stable tag: 1.0.2 Requires PHP: 7.4 License: GPLv2 or later License U

Reproduction of Belongs To Many Timestamp Isssue

Belongs to Many Issue This repository was created to demonstrate issue reported at: https://github.com/laravel/framework/issues/39727 The build fails,

It's basically a dynamic web browser extension that can display notifications with the help of an admin-controlled dynamic API.
It's basically a dynamic web browser extension that can display notifications with the help of an admin-controlled dynamic API.

D-NOTIFIER A self controlled dynamic API based web browser extension built by Sahil Kumar How It Works? It's basically a dynamic web browser extension

Discord-oauth2 - At the end of oAuth2, which I have been researching and reading for a long time,
Discord-oauth2 - At the end of oAuth2, which I have been researching and reading for a long time,

Discord-oauth2 - At the end of oAuth2, which I have been researching and reading for a long time, I finally found the way to connect with discord and get information, that's how I did it. If I'm wrong, feel free to email me so I can correct it.

This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets.
This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets.

Laravel Nova Search This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets. Requirements laravel-mix v6.0+ php 7.3+

In order to use the Korean Language on your Magento 2 store, it is time to start with Magento 2 Korean Language Pack in the set of informative documentations by Mageplaza. Magento 2 Korean Language Package is published by Magento 2 Translation Project at Crowdin, so all phrases will be replaced by the Korean language according to the contribution to that project. Please following up the guides in this post to convert the language with ease!
Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angular 2, and Bootstrap 3.

Laravel 5.2, Angular 2, and Bootstrap 3.3.* Time Tracker Laravel Angular Time Tracker is a simple time tracking application built on Laravel 5.2, Angu

Quickly and easily preview and test your Magento 2 order confirmation page, without hacks or spending time placing new order each time
Quickly and easily preview and test your Magento 2 order confirmation page, without hacks or spending time placing new order each time

Preview Order Confirmation Page for Magento 2 For Magento 2.0.x, 2.1.x, 2.2.x and 2.3.x Styling and testing Magento's order confirmation page can be a

Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker
Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker

Yii2 Date/Time Picker Widget Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker Demo Since this is a part of

Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.
Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.

About LivewireUI Spotlight LivewireUI Spotlight is a Livewire component that provides Spotlight/Alfred-like functionality to your Laravel application.

Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.
Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.

About Wire Elements Spotlight Wire Elements Spotlight is a Livewire component that provides Spotlight/Alfred-like functionality to your Laravel applic

Noteplan full-text search for Alfred - some assembly required
Noteplan full-text search for Alfred - some assembly required

Noteplan FTS for Alfred Noteplan full-text search for Alfred - some assembly required. Work in progress, mostly working. Usage n [Search phrase] - Ful

Bu dizin, 29.04.2021 tarihinde saat 18:00-19:00 arasında Discord'ta,
Bu dizin, 29.04.2021 tarihinde saat 18:00-19:00 arasında Discord'ta, "Türkiye Açık Kaynak Platformu" moderatörlüğünde gerçekleştirilen etkinlikte kullanılan dosyaları barındırmaktadır.

AcikHack21MindFramework Bu dizin, 29.04.2021 tarihinde saat 18:00-19:00 arasında Discord'ta, "Türkiye Açık Kaynak Platformu" moderatörlüğünde gerçekle

Kaiju is an open source verification bot based on Discord's OAuth written in C# and PHP, with the functionality of being able to integrate the user to a new server in case yours is suspended.
Kaiju is an open source verification bot based on Discord's OAuth written in C# and PHP, with the functionality of being able to integrate the user to a new server in case yours is suspended.

What is Kaiju? Kaiju is an open source verification bot for Discord servers, based on OAuth and with permission for the server owner, to be able to mi

A php sharex uploader with discord embed function/twitter card support

Sharex Uploader Simple Sharex Uploader with Discord embed function Download replace your data and upload to your sevrer

A Discord Webhook Application with the Coinbase API
A Discord Webhook Application with the Coinbase API

Ein PHP-Skript um einen Kryptowährungspreis in Discord darzustellen. Installation Windows Voraussetzungen Docker vollständig installiert Discord und e

Comments
  • Issue running the script

    Issue running the script

    Hi there,

    I was trying to setup your workflow but unfortunately I am getting the following error message:

    Code 127: /Users/fs/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/F2017730-4296-4048-A691-BF541040F1F5: line 2: /Users/fs/.bashrc: No such file or directory
    /Users/fs/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/F2017730-4296-4048-A691-BF541040F1F5: line 3: php: command not found
    

    I did install php as well as node using brew.

    Appreciate your help. Thanks a lot!

    opened by fabston 2
Releases(1.0.2)
Owner
I'm not sleepy, and there's no place I'm going to.
null
Embed live members' count from all your Discord server in your WordPress website

Live Members Counter For Discord This is the repository for the WordPress plugin: Live Members Counter for Discord Live Members Counter For Discord is

null 1 Oct 30, 2021
A discord-feature rich API plugin for PMMP.

DiscordBot DiscordBot a core plugin that provides an extensive API for plugins to interact with a discord bot creating endless possibilities. Examples

null 2 Jan 9, 2022
A discord bot for creating github repo issues.

Discord Issue Bot A discord bot for creating github repo issues. Requires: php-zlib, php-json, mysql, composer Tested on: Ubuntu 20.04.3, PHP Version

null 1 Jan 20, 2022
This app remembers todo list in every specified time (e. every minute, hour, day etc) through telegram bot

remember_todo_list This app remembers todo list in every specified time (e. every minute, hour, day etc) through telegram bot This project includes tw

Saidburxon 1 Nov 27, 2021
Alfred workflow to convert a Discord snowflake to time

Snowcord for Alfred Takes a Discord snowflake and converts it to a time (UTC, local and Unix timestamp). Also connects with Alfred-Whencord Download D

null 2 Jan 6, 2022
Kirby docs search workflow for Alfred

Kirby Docs search workflow for Alfred 4 An ultra-fast Kirby Docs search workflow for Alfred 4 Installation Download the latest version Install the wor

Adam Kiss 30 Dec 29, 2022
An Alfred 4 workflow for quickly opening directories in Visual Studio Code

Alfred Workflow - Open in Visual Studio Code An Alfred 4 workflow opening files or folders with Visual Studio Code. Note: Alfred Powerpack is required

Daan Hage 2 Jun 27, 2022
An ultra-fast Laravel docs search workflow for Alfred 3+.

Laravel Docs Workflow for Alfred An ultra-fast Laravel docs search workflow for Alfred 3+. Installation Download the latest version Install the workfl

Till Krüss 317 Dec 21, 2022
This Repository contains a custom Workflow for Alfred which provides the function to instantly search in the Magento 2 DevDocs

Introduction Add the custom search to your Alfred Workflow and have a quicker access to the Magento 2 DevDocs. Installation Just download the alfredwo

David Lambauer 10 Jun 29, 2022
A fast Directus docs search workflow for Alfred

Directus Docs Workflow for Alfred A fast Directus docs search workflow for Alfred. Adapted from Tailwind CSS Docs, which is adapted from Alfred VueJS

null 2 Aug 28, 2022