我正在循环当月的日子,我也想显示当月的平日,但我不知道。
//showing the days number of the current month
$currentDays = date('d');
for($i=1;$i<=$currentDays;$i++)
{
//print the day number
echo $i.'\n';
}
我试图根据当月构建一个12个月的数组,所以当月是3月份,我的数组应该如下所示: const months =[“March”, “February”, “January”, “December”, “November”, “October”] etc, all the way to 12 previous months
当月开始
<?php echo date("Y-m-1");?>
当月末
<?php echo date("Y-m-31");?>
and this is mysql query
$result = mysql_query("SELECT * FROM fuel where monthdate BETWEEN 'current month start' AND 'current month end' ORDER BY CAST(amount as SIGNED INTEGER) DESC LI
我需要在当月的第一天到当月的最后一天找到某些数据。
select count(*) from q_aggr_data as a
where a.filial_='fil1'
and a.operator_ like 'unit%'
and date_trunc('day',a.s_end_)='"+ date_to_search+ "'
group by a.s_name_,date_trunc('day',a.s_end_)
date
我有这个查询,我只想获得当月创建的数据。
public function index(Request $request)
{
if($request->ajax())
{
$data = DB::table('tbl_lista_contactabilidad as a')
->select('a.id','a.rif','a.razon_social','a.postventaatcs_id','fecha_contacto','a.c
好吧我放弃了。
我在试着做这个剧本
<script>
$(document).ready(function(){
var d = new Date();
n = d.getMonth();
if (n == 11) {
src="extrafiles/effect/snow.js";
}
});
</script>
当月份是十二月时,打电话给"snow.js“。
但不管用。想法?
编辑:
也许这是个更好的方法?
if ( d.getMonth().match(11) ){ //do调用snow.j