CakeFest 2024: The Official CakePHP Conference

cal_to_jd

(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)

cal_to_jdサポートされるカレンダーからユリウス積算日に変換する

説明

cal_to_jd(
    int $calendar,
    int $month,
    int $day,
    int $year
): int

cal_to_jd() は、指定した calendar の日付からユリウス積算日を計算します。 サポートされる calendarCAL_GREGORIANCAL_JULIANCAL_JEWISH および CAL_FRENCH です。

パラメータ

calendar

変換元のカレンダー。 CAL_GREGORIANCAL_JULIANCAL_JEWISH あるいは CAL_FRENCH のいずれか。

month

月を表す数値。有効な範囲は calendar に依存します。

day

日を表す数値。有効な範囲は calendar に依存します。

year

年を表す数値。有効な範囲は calendar に依存します。

戻り値

ユリウス積算日を返します。

参考

  • cal_from_jd() - ユリウス積算日からサポートされるカレンダーに変換する
  • frenchtojd() - フランス革命暦をユリウス積算日に変換する
  • gregoriantojd() - グレゴリウス日をユリウス積算日に変換する
  • jewishtojd() - ユダヤ暦の日付けをユリウス積算日に変換する
  • juliantojd() - ユリウス暦をユリウス積算日に変換する
  • unixtojd() - Unix タイムスタンプをユリウス歴に変換する

add a note

User Contributed Notes 2 notes

up
2
ashton at ieee dot org
7 years ago
Julian days begin at noon, while the days of the Gregorian and Julian calendars are usually thought of as beginning at midnight. For the Gregorian and Julian calendars, the function behaves as if the conversion were performed at noon.
up
-1
ashton at ieee dot org
7 years ago
The earliest supported date in the Julian calendar is January 2, 4713 BC. The corresponding Julian day count is 1. PHP treats -4713 as equal to 4713 BC, and does not allow the year 0; this practice is different than the custom of astronomers, who treat -4712 as equal to 4713 BC.
To Top