PHP: JewishToJD - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

JulianToJD jdtounix

Last updated: Fri, 26 Jan 2007

view this page in

# JewishToJD

(PHP 3, PHP 4, PHP 5)

JewishToJD -- Converts a date in the Jewish Calendar to Julian Day Count

## Description

int jewishtojd ( int month, int day, int year )

Although this function can handle dates all the way back to the year 1 (3761 B.C.), such use may not be meaningful. The Jewish calendar has been in use for several thousand years, but in the early days there was no formula to determine the start of a month. A new month was started when the new moon was first observed.

add a note User Contributed Notes
JewishToJD
erelsgl dot NOSPAM at cs dot technion dot ac dot il
20-Sep-2006 02:21
`JewishToJD returns 0 when the day number is 31 or more.
However, when the day number is 30, JewishToJD returns a valid Julian Day, even when the month only has 29 days. So, for example:
<?php
JDToJewish(JewishToJD(4,30,5767)) === "5/1/5767"
?>`
erelsgl dot NOSPAM at cs dot technion dot ac dot il
19-Sep-2006 05:55
`For non-leap years, this function returns the same for month 6 (Adar I) and month 7 (Adar II), so, for example:
<?php
JewishToJD(6,15,5766) === JewishToJD(7,15,5766)
JDToJewish(JewishToJD(7,15,5766)) === '6/15/5766'
?>`
add a note
JulianToJD jdtounix

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST