Hàm PHP cal_to_jd()
Ví 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;
?>
Chạy ví 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 chỉ định thành Đếm 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ả về: | Trả về số Ngày Julian |
---|---|
Phiên bản PHP: | 4.1+ |
❮ Tham khảo lịch PHP