-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext-date-time.ahk
More file actions
41 lines (35 loc) · 809 Bytes
/
Copy pathtext-date-time.ahk
File metadata and controls
41 lines (35 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
Date and time functions 📅
*/
:*:dd;:: ; Same as macOS shortcut
{
CurrentDate()
}
CurrentDate() {
; Type date in YYYY-MM-DD format => 2029-12-31
currentDateTime := FormatTime(, 'yyyy-MM-dd')
Send(currentDateTime)
return
}
CurrentShortDate() {
; Type date in YYYYMMDD format => 20291231
currentDateTime := FormatTime(, 'yyyyMMdd')
Send(currentDateTime)
return
}
CurrentWeek() {
; Type week number in wNN format => w37, w03
weekNo := SubStr(A_YWeek, -2)
SendInput('w' . weekNo)
return
}
CurrentYearDay() {
; Type day of the year number in NN format => 305
SendInput(A_YDay)
return
}
FullDate() {
; Type current date and time => 2029-12-31 23:59
Send(A_Year . '-' . A_Mon . '-' . A_MDay . ' ' . A_Hour . ':' . A_Min)
return
}