-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.js
66 lines (46 loc) · 1.38 KB
/
script.js
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
function nextTime(){
var currentDate = new Date();
var hours = currentDate.getHours();
var currentDay =currentDate.getDay();
var mm = currentDate.getMonth() + 1;
var dd = currentDate.getDate();
var yyyy = currentDate.getFullYear();
currentDate = mm + '/' + dd + '/' + yyyy;
currentDate = new Date(currentDate);
var referenceDate = new Date("01/7/2021");
var days = currentDate.getTime() - referenceDate.getTime();
days = days / (1000 * 3600 * 24);
var weeks = (days/7);
//console.log(currentDay);
if (currentDay == 4){
if(hours >= 20){
weeks = Math.trunc(weeks) + 1;
}
else{
weeks = Math.trunc(weeks);
}
} else{
weeks = Math.trunc(weeks) + 1;
}
var i;
var add;
//console.log(weeks);
var nextMeeting = referenceDate;
for ( i = weeks; i < weeks*2; i++) {
nextMeeting.setDate(nextMeeting .getDate() + 7);
console.log(nextMeeting);
console.log("If Your Here You Should definatly come to Hackclub")
console.log("$")
}
var mm = nextMeeting.getMonth() + 1;
var dd = nextMeeting.getDate();
var yyyy = nextMeeting.getFullYear();
nextMeeting = mm + '/' + dd + '/' + yyyy;
var text = "Club Meeting on Zoom on 4:00 PM CST Thursday "+nextMeeting+" (Click to Join)<br>";
console.log("--------------------")
console.log("#")
console.log("/")
console.log("#")
console.log("/")
return text;
}