To use the module you put inside your shortcut:
Text (for the format you want like time or date)
Run shortcut with text for input
What's New
Version 3.1
Updated comment, variable names, and the shortcut for iOS 15
What it does
18 actions-
CommentTo use the module you put inside your shortcut: Text (for the format you want like time or date) Run shortcut with text for input Commands: time_sh date_sh time_med date_med
-
Text
-
Set VariableinputCommand
-
Date
-
Set VariablerightNow
-
If
-
Format Date
-
If
-
If
-
Format Date
-
If
-
If
-
Format Date
-
If
-
If
-
Format Date
-
If
-
Text
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/calendar'
#define color darkgray
#define glyph gear
/*
To use the module you put inside your shortcut:
Text (for the format you want like time or date)
Run shortcut with text for input
Commands:
time_sh
date_sh
time_med
date_med
*/
@inputCommand = "{ShortcutInput}"
currentDate()
@rightNow
if @inputCommand contains "time_sh" {
formatTimestamp(@rightNow, "None", "Short")
} else {
if @inputCommand contains "time_med" {
formatTimestamp(@rightNow, "None", "Medium")
} else {
if @inputCommand contains "date_sh" {
formatTime(@rightNow, "None")
} else {
if @inputCommand contains "date_med" {
formatTimestamp(@rightNow, "Medium", "None")
} else {
}
}
}
}
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by shortgram
You Might Also Like
Advertisement