Jalankan tiap hari kecuali ahad

    0

    0

    Guntar Susatyo

    The code is a function that will submit a form on a given day, assuming that the given day is in one of the weekday predetermined list.

    Shortcut: jalankanKecualiAhad

    function submitTiapHariKecualiAhad() {
      var tanggalnya = new Date();  
      const weekday = ["Ahad","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"];
      var hariIni = weekday[tanggalnya.getDay()];
      if (hariIni === "Senin" || hariIni === "Selasa" || hariIni === "Rabu" || hariIni === "Kamis" || hariIni === "Jumat" || hariIni === "Sabtu") {
        // jalankan apa yang mau dijalankan    
      }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.