File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,47 @@ export default function Impressum() {
21
21
</ a > { ' ' }
22
22
in Berlin. Drop in and say hi!
23
23
</ p >
24
+ < div >
25
+ < p >
26
+ Next Stammtisch:
27
+ { ( ( ) => {
28
+ const today = new Date ( )
29
+ const currentMonth = today . getMonth ( )
30
+ const currentYear = today . getFullYear ( )
31
+
32
+ // Create date object for 1st of current month
33
+ let date = new Date ( currentYear , currentMonth , 1 )
34
+
35
+ // Find first Wednesday
36
+ while ( date . getDay ( ) !== 3 ) {
37
+ date . setDate ( date . getDate ( ) + 1 )
38
+ }
39
+
40
+ // Add 2 weeks to get to 3rd Wednesday
41
+ date . setDate ( date . getDate ( ) + 14 )
42
+
43
+ // If 3rd Wednesday already passed this month, move to next month
44
+ if ( date < today ) {
45
+ date = new Date ( currentYear , currentMonth + 1 , 1 )
46
+ while ( date . getDay ( ) !== 3 ) {
47
+ date . setDate ( date . getDate ( ) + 1 )
48
+ }
49
+ date . setDate ( date . getDate ( ) + 14 )
50
+ }
51
+
52
+ return (
53
+ < span className = "font-medium" >
54
+ { date . toLocaleDateString ( 'en-US' , {
55
+ weekday : 'long' ,
56
+ year : 'numeric' ,
57
+ month : 'long' ,
58
+ day : 'numeric' ,
59
+ } ) }
60
+ </ span >
61
+ )
62
+ } ) ( ) }
63
+ </ p >
64
+ </ div >
24
65
< p >
25
66
We are coordinating on Matrix:
26
67
< a
You can’t perform that action at this time.
0 commit comments