PHP date_sunset() လုပ်ဆောင်ချက်
ဥပမာ
ယနေ့ ပေါ်တူဂီ၊ Lisbon အတွက် နေဝင်ချိန်ကို ပြန်ပေးပါ။
<?php
// Lisbon, Portugal:
// Latitude: 38.4 North, Longitude: 9 West
// Zenith ~= 90, offset: +1 GMT
echo("Lisbon, Portugal: Date: " . date("D M d Y"));
echo("<br>Sunset time: ");
echo(date_sunset(time(),SUNFUNCS_RET_STRING,38.4,-9,90,1));
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
date_sunset() လုပ်ဆောင်ချက်သည် သတ်မှတ်ထားသော နေ့နှင့် တည်နေရာအတွက် နေဝင်ချိန်ကို ပြန်ပေးသည်။
အကြံပြုချက်- သတ်မှတ်ထားသော နေ့နှင့် တည်နေရာအတွက် နေထွက်ချိန်ကို ပြန်ပေးရန် date_sunrise() လုပ်ဆောင်ချက်ကို ကြည့်ပါ ။
အထားအသို
date_sunset(timestamp, format, latitude, longitude, zenith, gmtoffset)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
timestamp | Required. Specifies the timestamp of the day from which the sunset time is taken |
format |
Optional. Specifies how to return the result:
|
latitude | Optional. Specifies the latitude of the location. Defaults to North. To specify a value for South, pass in a negative value |
longitude | Optional. Specifies the longitude of the location. Defaults to East. To specify a value for West, pass in a negative value |
zenith | Optional. Defaults to date.sunset_zenith |
gmtoffset | Optional. Specifies the difference between GMT and local time in hours |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | သတ်မှတ်ထားသော ဖော်မတ်ဖြင့် နေဝင်ချိန်ကို အောင်မြင်မှုဖြင့် ပြန်ပေး သည် ။ ရှုံးနိမ့်မှုအပေါ် မှားသည်။ |
---|---|
PHP ဗားရှင်း- | ၅+ |
ပြောင်းလဲမှုမှတ်တမ်း- | PHP 5.1.0 မှ ဤလုပ်ဆောင်ချက်သည် E_STRICT နှင့် E_NOTICE အချိန်ဇုန် အမှားများကို ထုတ်ပေးသည် |
❮ PHP နေ့စွဲ/အချိန် အကိုးအကား