We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61bdc61 commit 517bae4Copy full SHA for 517bae4
commands/conversions/human-date-to-epoch.sh
@@ -0,0 +1,23 @@
1
+#!/bin/bash
2
+
3
+# Required parameters:
4
+# @raycast.schemaVersion 1
5
+# @raycast.title Convert Human-Readable Date To Epoch
6
+# @raycast.mode silent
7
+#
8
+# Optional parameters:
9
+# @raycast.icon ⏱
10
+# @raycast.packageName Conversions
11
+# @raycast.needsConfirmation false
12
+# @raycast.argument1 {"type": "text", "placeholder": "Date"}
13
14
+# Documentation:
15
+# @raycast.description Convert human-readable date to timestamp epoch.
16
+# @raycast.author Siyuan Zhang
17
+# @raycast.authorURL https://github.com/kastnerorz
18
19
+date=${1}
20
+epoch=$(echo `date -jRuf "%F %T" "$date" "+%s"`)
21
+echo -n "$epoch" | pbcopy
22
23
+echo "Converted $date to $epoch"
0 commit comments