ANA SAYFA | FORUM | SİTENİZ İÇİN | İÇERİK EKLE | EN YENİLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | İLETİŞİM
Arama:
Tüm kategorilerde Google JAVAScript Araçlar
// ÖZELLEŞTİR
E-posta:
Şifre:
Üye Ol
|
Şifremi Unuttum
>> Bayramınız kutlu olsun (0 yorum)>> Yeni yılınız kutlu olsun (0 yorum)>> JAVASCRİPT İndir ve JQUERY içerikleri (0 yorum)>> ASP İndir -- Forum bölümü (0 yorum)>> Yeni yılınız kutlu olsun (0 yorum)
// EN YENİLER
// EN POPÜLER
// Anasayfa » JAVASCRIPT» Tarih&Saat işlemleri
Oy:
<script type="text/javascript"> /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Alexei Kourbatov | http://www.linuxtopia.org/online_books/javascript_guides/javascript_faq/index.htm */ function inDate() { s=prompt("Input date (example: 1 Jan 2008)",""); if (s!="" && s!=null) determineDay(s); } function determineDay(parStr) { while (parStr.charAt(parStr.length-1)==" ") parStr=parStr.substring(0,parStr.length-1); while (parStr.charAt(0)==" ") parStr=parStr.substring(1,parStr.length); dd=parseInt(parStr,10); yyyy=parseInt(parStr.substring(parStr.lastIndexOf(" ")+1,parStr.length)) mm=-1; if (parStr.toUpperCase().indexOf("JAN")!=-1) mm=0; if (parStr.toUpperCase().indexOf("FEB")!=-1) mm=1; if (parStr.toUpperCase().indexOf("MAR")!=-1) mm=2; if (parStr.toUpperCase().indexOf("APR")!=-1) mm=3; if (parStr.toUpperCase().indexOf("MAY")!=-1) mm=4; if (parStr.toUpperCase().indexOf("JUN")!=-1) mm=5; if (parStr.toUpperCase().indexOf("JUL")!=-1) mm=6; if (parStr.toUpperCase().indexOf("AUG")!=-1) mm=7; if (parStr.toUpperCase().indexOf("SEP")!=-1) mm=8; if (parStr.toUpperCase().indexOf("OCT")!=-1) mm=9; if (parStr.toUpperCase().indexOf("NOV")!=-1) mm=10; if (parStr.toUpperCase().indexOf("DEC")!=-1) mm=11; d=new Date(); d.setDate(1); d.setYear(yyyy); d.setMonth(mm); d.setDate(dd); d.setHours(12); ww=d.getDay(); if (ww==0) wDay="Sunday"; if (ww==1) wDay="Monday"; if (ww==2) wDay="Tuesday"; if (ww==3) wDay="Wednesday"; if (ww==4) wDay="Thursday"; if (ww==5) wDay="Friday"; if (ww==6) wDay="Saturday"; alert (dd+"."+(mm+1)+"."+yyyy+" is "+wDay); } </script> <form name="f1"> <input value="Weekdays Finder" onclick="inDate()" type="button"> </form>
Kodu Kopyala
Hata Bildir | Tavsiye Et
Bu içeriğe oy verin:
Yorumlar / Yeni Yorum Yaz Bu içeriğe yorum yazılmamış.
ANA SAYFA | İÇERİK EKLE | YENİ EKLENENLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | DESTEKLEYENLER | İLETİŞİM