<script>
function showdate() {
week= new Array("يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنج شنبه","جمعه","شنبه")
months = new Array("فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند");
a = new Date();
d= a.getDay();
day= a.getDate();
month = a.getMonth()+1;
year= a.getYear();
year = (year== 0)?2000:year;
(year<1000)? (year += 2000):true;
year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621;
switch (month) {
case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break;
case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break;
case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break;
case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break;
case 5:
case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break;
case 7:
case 8:
case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break;
case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break;
case 11:
case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break;
default: break;
}
document.write("امروز: "+week[d]+" "+day+" "+months[month-1]+" "+ year);
}
</script>
<script>showdate()</script>
<script language="javascript" src="shamsi.js"></script>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<META NAME="Language" CONTENT="fa">
<script>
function showdate() {
week= new Array("يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنج شنبه","جمعه","شنبه")
months = new Array("فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند");
a = new Date();
d= a.getDay();
day= a.getDate();
month = a.getMonth()+1;
year= a.getYear();
year = (year== 0)?2000:year;
(year<1000)? (year += 2000):true;
year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621;
switch (month) {
case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break;
case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break;
case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break;
case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break;
case 5:
case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break;
case 7:
case 8:
case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break;
case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break;
case 11:
case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break;
default: break;
}
document.write("امروز: "+week[d]+" "+day+" "+months[month-1]+" "+ year);
}
</script>
</head>
<body>
<script>showdate()</script>
</body>
</html>
mohammadram گفت:با سلام به دوستان ايراني
به سفارش آقا مجيد كه عشق فارسي نويسي را اين آقا باسايتش تو كله من انداخت.
يه عمر باسه اين اجنبي نوشتيم و سرويس داديم دريق از يه تشكر خوشك و خالي. از وقتي با شما ها آشنا شدم و ديدم چقدر صميمي در كنار هم اطلاعاتتون را با هم تقسيم مي كنيد خيلي حال كردم.... داستان دراز و احساسي
now that's enough for today. lets have a look to the shamsi code.
very simple just copy the code and paste it in ur page.
i leave the comment for urself. becuase it seems easy
کد:<html><head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> <META NAME="Language" CONTENT="fa"> .................... }body> </html>
Alipouri گفت:اول سلام بعد كلام
سلام:
آقا جون حالا فعلا نميخواد دعوا كني چون كد كار نميكنه.
ممنونم ازتون كه اون چيزي را كه بلدين در اختيار ما ميگذارين(كدم كار نمي كنه الكي دعوا نكنيد)