Hàm cal_to_jd () trong PHP
Thí dụ
Chuyển đổi ngày 20 tháng 6 năm 2007 (lịch Gregory) sang Đếm ngày Julian:
<?php
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>
Định nghĩa và Cách sử dụng
Hàm cal_to_jd () chuyển đổi một ngày trong lịch cụ thể thành Số ngày Julian.
Cú pháp
cal_to_jd(calendar,month,day,year);
Giá trị tham số
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 |
Chi tiết kỹ thuật
Giá trị trả lại: | Trả về số Ngày Julian |
---|---|
Phiên bản PHP: | 4.1+ |
❮ Tham khảo lịch PHP