PHP cal_to_jd()ฟังก์ชัน
ตัวอย่าง
แปลงวันที่ 20 มิถุนายน 2550 (ปฏิทินเกรกอเรียน) เป็นจำนวนวันจูเลียน:
<?php
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>
ความหมายและการใช้งาน
ฟังก์ชัน cal_to_jd() แปลงวันที่ในปฏิทินที่ระบุเป็น Julian Day Count
ไวยากรณ์
cal_to_jd(calendar,month,day,year);
ค่าพารามิเตอร์
Parameter | Description |
---|---|
calendar | Required. Specifies the calendar to convert from. Must be one of the following values:
|
month | Required. Specifies the month as a number |
day | Required. Specifies the day as a number |
year | Required. Specifies the year as a number |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ส่งกลับหมายเลข Julian Day |
---|---|
รุ่น PHP: | 4.1+ |
❮ การอ้างอิงปฏิทิน PHP