PHP checkdate() လုပ်ဆောင်ချက်
ဥပမာ
ရက်စွဲများစွာသည် တရားဝင်ဂရီဂိုရီယန်ရက်စွဲများ ဟုတ်မဟုတ် စစ်ဆေးပါ-
<?php
var_dump(checkdate(12,31,-400));
echo "<br>";
var_dump(checkdate(2,29,2003));
echo "<br>";
var_dump(checkdate(2,29,2004));
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
checkdate() လုပ်ဆောင်ချက်ကို Gregorian ရက်စွဲကို အတည်ပြုရန်အတွက် အသုံးပြုပါသည်။
အထားအသို
checkdate(month, day, year)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
month | Required. Specifies the month as a number between 1 and 12 |
day | Required. Specifies the day as a number between 1 and 31 |
year | Required. Specifies the year as a number between 1 and 32767 |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ရက်စွဲမှန်ကန်ပါက မှန်ကန်ပါသည်။ မဟုတ်ရင် မှားမယ်။ |
---|---|
PHP ဗားရှင်း- | 4.0+ |
❮ PHP နေ့စွဲ/အချိန် အကိုးအကား