PHP date_sunrise() လုပ်ဆောင်ချက်
ဥပမာ
ယနေ့ ပေါ်တူဂီနိုင်ငံ၊ 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>Sunrise time: ");
echo(date_sunrise(time(),SUNFUNCS_RET_STRING,38.4,-9,90,1));
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
date_sunrise() လုပ်ဆောင်ချက်သည် သတ်မှတ်ထားသော နေ့နှင့် တည်နေရာအတွက် နေထွက်ချိန်ကို ပြန်ပေးသည်။
အကြံပြုချက်- သတ်မှတ်ထားသော နေ့နှင့် တည်နေရာအတွက် နေဝင်ချိန်ကို ပြန်ပေးရန် date_sunset() လုပ်ဆောင်ချက်ကို ကြည့်ပါ ။
အထားအသို
date_sunrise(timestamp, format, latitude, longitude, zenith, gmtoffset)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
timestamp | Required. Specifies the timestamp of the day from which the sunrise 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.sunrise_zenith |
gmtoffset | Optional. Specifies the difference between GMT and local time in hours |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | နေထွက်ချိန်၊ သတ်မှတ်ထားသော ဖော်မတ်ဖြင့် အောင်မြင်မှုကို ပြန်ပေး သည် ။ ရှုံးနိမ့်မှုအပေါ် မှားသည်။ |
---|---|
PHP ဗားရှင်း- | ၅+ |
PHP Changelog- | PHP 5.1- ဤလုပ်ဆောင်ချက်သည် ယခုအခါ E_STRICT နှင့် E_NOTICE အချိန်ဇုန် အမှားအယွင်းများကို ထုတ်ပေးပါသည်။ |
❮ PHP နေ့စွဲ/အချိန် အကိုးအကား