• 24-04-2014, 13:27:56
    #1
    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
  • 24-04-2014, 13:55:36
    #2
    $bugun = date("d-m-Y");
    $son_yedi_gun = date("d-m-Y",strtotime("-7 days"));
    $son_uc_ay = date("d-m-Y",strtotime("-3 months"));
    gibi gibi

    geçen ayla bu ay ı anlayamadım
  • 24-04-2014, 14:11:32
    #3
    Saol 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 Zamanlar
    ulast adlı üyeden alıntı: mesajı görüntüle
    $bugun = date("d-m-Y");
    $son_yedi_gun = date("d-m-Y",strtotime("-7 days"));
    $son_uc_ay = date("d-m-Y",strtotime("-3 months"));
    gibi gibi

    geçen ayla bu ay ı anlayamadım