forked from Maxwell-Fisher/168-hour-time
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path168h time.bat
94 lines (78 loc) · 4.31 KB
/
168h time.bat
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
::168 hour time format, because 24 hour time wasn't enough
::https://maxwellcrafter.com
::More regretful code can be found at https://github.com/Maxwell-Fisher/168-hour-time
:::::Everything is terrible, enjoy this even more terrible code:::::
:: ::
:: |\/| ---- _ ::
:: =(--)=_____ \ ::
:: c___ (______/ ::
:: ::
::19ddefabe5c2652a30e671914cf84c49b0a6f45318adacc0aeb3563ae72d134e::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: MIT License ::
:: ::
:: Copyright (c) 2022 Maxwell Fisher (@Maxwellcrafter) ::
:: ::
:: Permission is hereby granted, free of charge, to any person obtaining a copy ::
:: of this software and associated documentation files (the "Software"), to deal ::
:: in the Software without restriction, including without limitation the rights ::
:: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ::
:: copies of the Software, and to permit persons to whom the Software is ::
:: furnished to do so, subject to the following conditions: ::
:: ::
:: The above copyright notice and this permission notice shall be included in all ::
:: copies or substantial portions of the Software. ::
:: ::
:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ::
:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ::
:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ::
:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ::
:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ::
:: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ::
:: SOFTWARE. ::
:: ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off & echo [?25l
title
mode 25, 3
cls
::Haha, CPU usage go brrrr
:loopBeginning
::Adds a certain amount of hours depending on the day of the week
set timeDifference=0
echo %date% > nul | find "Sun" && set timeDifference=0
echo %date% > nul | find "Mon" && set timeDifference=24
echo %date% > nul | find "Tue" && set timeDifference=48
echo %date% > nul | find "Wed" && set timeDifference=72
echo %date% > nul | find "Thu" && set timeDifference=96
echo %date% > nul | find "Fri" && set timeDifference=120
echo %date% > nul | find "Sat" && set timeDifference=144
::Takes the time out of the time
set hour=%time:~0,2%
set minute=%time:~3,2%
set second=%time:~6,2%
::Adds the amount of hours from the previous day to the current day
set /a hour=hour+timeDifference
::Removes the zeros from the minute and seconds. Even they will be added later. Because it can.
set /a minute=minute
set /a second=second
::Sets the hour to be 3 digits, with zeros before the "normal" numbers
set hour=00%hour%
set hour=%hour:~-3%
::Does the same as the hour thing above, but not as cursed
set minute=0%minute%
set minute=%minute:~-2%
::Same thing here
set second=0%second%
set second=%second:~-2%
::Clears the screen and then shows you the regret
echo [1;1f
echo %hour%:%minute%:%second%
sleep.exe 50 ms
::Repeat the suffering all over again (forever)
goto loopBeginning
::This is here incase everything goes wrong
echo Oops, everything is terrible!
pause
exit /b