@@ -65,9 +65,8 @@ function fail() { //Database connection fails
6565 }
6666 }
6767
68- $ today = time ();
69-
7068 //Current date & time
69+ $ today = time ();
7170 if ($ user_timezone !='' ) date_default_timezone_set ($ user_timezone );
7271 $ time = round ($ today /60 )*60 ;
7372 $ current_day = date ("d " , $ time );
@@ -78,10 +77,12 @@ function fail() { //Database connection fails
7877 $ current_time = strtotime ($ current_day .' ' .$ current_month .' ' .$ current_year .' ' .$ current_hour .$ current_mins .'H ' );
7978
8079 //convert date tags
80+ $ day_word = array (_ ('Sunday ' ), _ ('Monday ' ), _ ('Tuesday ' ), _ ('Wednesday ' ), _ ('Thursday ' ), _ ('Friday ' ), _ ('Saturday ' ));
81+ $ month_word = array ('' , _ ('January ' ), _ ('February ' ), _ ('March ' ), _ ('April ' ), _ ('May ' ), _ ('June ' ), _ ('July ' ), _ ('August ' ), _ ('September ' ), _ ('October ' ), _ ('November ' ), _ ('December ' ));
8182 $ currentdaynumber = date ('d ' , $ today );
82- $ currentday = date ('l ' , $ today );
83+ $ currentday = $ day_word [ date ('w ' , $ today )] ;
8384 $ currentmonthnumber = date ('m ' , $ today );
84- $ currentmonth = date ( ' F ' , $ today ) ;
85+ $ currentmonth = $ currentmonthnumber == 10 ? $ month_word [ $ currentmonthnumber ] : $ month_word [ str_replace ( ' 0 ' , '' , $ currentmonthnumber )] ;
8586 $ currentyear = date ('Y ' , $ today );
8687 $ unconverted_date = array ('[currentdaynumber] ' , '[currentday] ' , '[currentmonthnumber] ' , '[currentmonth] ' , '[currentyear] ' );
8788 $ converted_date = array ($ currentdaynumber , $ currentday , $ currentmonthnumber , $ currentmonth , $ currentyear );
0 commit comments