Alttakileri nasıl başlangıç ve bitiş tarigi gibi listelerim:
Son 7 gün
Bu Ay
Gecen Ay
Son 3 Ay
Son 6 Ay
Son 12 Ay
Tüm Zamanlar
Örnek : Son 3 ay' ın karşılığı : "24-04-2014 & 01-02-2014" olmalı. Diğerleride bulunduğumuz günden başlayıp bitiş tarihi
php tarih işlemleri hakkında.
2
●322
- 24-04-2014, 14:11:32Saol Ama ben hallettim. biraz basit uzun gibi oldu ama.
bugün <?=date('d-m-Y');?> <br /> Son 7 gün <?=date('d-m-Y');?> <?=date('d-m-Y',($zaman-60*60*24*7));?> <br /> Bu Ay 01-<? $date = strtotime("this Month"); echo date("m-Y", $date); ?> & <? $date = strtotime("this Month"); echo aydakiGunSayisi4(date("m", $date)).date("-m-Y", $date); ?> <br /> Gecen Ay 01-<? $date = strtotime("last Month"); echo date("m-Y", $date); ?> & <? $date = strtotime("last Month"); echo aydakiGunSayisi4(date("m", $date)).date("-m-Y", $date); ?> <br /> Son 3 Ay 01-<? $date = strtotime("-2 Month"); echo date("m-Y", $date); ?> & <? $date = strtotime("-2 Month"); echo (aydakiGunSayisi4(date("m", $date))-1).date("-m-Y", $date); ?> <br /> Son 6 Ay 01-<? $date = strtotime("-5 Month"); echo date("m-Y", $date); ?> & <? $date = strtotime("-4 Month"); echo aydakiGunSayisi4(date("m", $date)).date("-m-Y", $date); ?> <br /> Son 12 Ay 01-<? $date = strtotime("-11 Month"); echo date("m-Y", $date); ?> & <? $date = strtotime("-11 Month"); echo aydakiGunSayisi4(date("m", $date)).date("-m-Y", $date); ?> <br /> Tüm Zamanlarulast adlı üyeden alıntı: mesajı görüntüle