Share code hiển thị thời gian ngày giờ đếm ngày bằng code xtscript cho trang wap/web xtgem
Code:
<!--parser:xtscript-->
assign $time = <xt:tdate format="l, d/m/20y" tzone="7"/>
assign $time = call str_replace $subject=$time;$search=Monday;$replace=Thứ hai
assign $time = call str_replace $subject=$time;$search=Tuesday;$replace=Thứ ba
assign $time = call str_replace $subject=$time;$search=Wednesday;$replace=Thứ tư
assign $time = call str_replace $subject=$time;$search=Thursday;$replace=Thứ năm
assign $time = call str_replace $subject=$time;$search=Friday;$replace=Thứ sáu
assign $time = call str_replace $subject=$time;$search=Saturday;$replace=Thứ bảy
assign $time = call str_replace $subject=$time;$search=Sunday;$replace=Chủ nhật
<!--/parser:xtscript-->