• 13-11-2019, 15:32:46
    #1
    PHP ile bir tarihin(13.11.2019 veya 2019-11-13) hangi gün olduğunu öğrenmeyi aşağıdaki blogumda detaylıca anlattım.
    Ayrıca fonksiyon haline getirip kodları sizlerle paylaşıyorum.

    https://www.kayisdagi.com/blog/php-i...u-ogrenme.html
  • 13-11-2019, 15:38:48
    #2
    Üyeliği durduruldu
    $timestamp = strtotime('2009-10-22');
    $day = date('D', $timestamp);
    var_dump($day);
    string 'Thu' (length=3)

    $day = date('l', $timestamp);
    var_dump($day);
    string 'Thursday' (length=8)

    Kaynak https://stackoverflow.com/questions/...-date-with-php
  • 13-11-2019, 15:45:57
    #3
    Daha kısası var
    setlocale(LC_TIME, 'tr_TR.UTF-8'); // veya setlocale(LC_TIME, 'turkish.UTF-8');
    $day = strftime('%A', strtotime('27-09-2019'));
    echo $day; // Cuma
  • 13-11-2019, 15:58:20
    #4
    Daryl adlı üyeden alıntı: mesajı görüntüle
    Daha kısası var
    setlocale(LC_TIME, 'tr_TR.UTF-8'); // veya setlocale(LC_TIME, 'turkish.UTF-8');
    $day = strftime('%A', strtotime('27-09-2019'));
    echo $day; // Cuma
    function gun($tarih) {
    setlocale(LC_TIME, 'tr_TR.UTF-8'); 
    $day = strftime('%A', strtotime($tarih));
    return $day;
    }
    echo gun("13.11.2019")
    // Sonuç : Çarşamba
    // Teşekkürler yorumun için.