ShareShortcuts
Dupliquer « Date Module »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que shortgram soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
59K
Enregistré
0
Actions
18
Catégorie
Utilities
Version
3.1
Langue
EN

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

Nouveautés

Version 3.1

Updated comment, variable names, and the shortcut for iOS 15

Historique des versions
3.1 8 févr. 2022

Updated comment, variable names, and the shortcut for iOS 15

3.0 29 mai 2020

Instead of date_me and time_me it is now date_med and time_med

2.1 21 mai 2020

Updated comments

2.0 21 mai 2020

Added medium date and time format and change the inputs to get the outputs also added default string return

1.0 21 mai 2020

First release

Ce qu’il fait

18 actions
  1. Comment
    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
  2. Text
  3. Set Variable
    inputCommand
  4. Date
  5. Set Variable
    rightNow
  6. If
  7. Format Date
  8. If
  9. If
  10. Format Date
  11. If
  12. If
  13. Format Date
  14. If
  15. If
  16. Format Date
  17. If
  18. Text

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#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 {
			}
		}
	}
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Plus de shortgram

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité