Description Usage Arguments Value Note Author(s) Examples
calender conversions, Julian day number from civil date and back, names of months, weekdays.
1 2 3 4 5 6 7 8 |
yr, mo, dy |
integer, year, month, day of date |
hr, JD |
real, hrs, Julian date |
leap |
Boolean, = is given year a leap year ? |
dk |
integer, day in year |
Dat2Jul: JD, year year BC is to be given as -|year-1|, e.g. 4 BC = -3, 1 BC = 0 !!
Jul2Dat: date ( year, month, day, hours ).
monthsN: cumulative sum of days in months.
Mnames: names of months.
Dnames: names of weekdays.
mdiny: c( number of month, day in (leap) year ).
Wday: name of weekday from dk mod 7.
Yday: number of day, from 0 = Jan 1.
See also
http://www.onlineconversion.com/julian_date.htm
http://en.wikipedia.org/wiki/Julian_day#Converting_Julian_or_Gregorian_calendar
_date_to_Julian_Day_Number
Julian date is a continuous numbering of days since the biblical day of creation in 4713 BC, Jan. 1, 12 hours. The Julian calendar date 1582 Oct 4 was succeeded by the Gregorian calendar date 1582 Oct 15.
Conversion of Julian and Gregorian dates to Julian day number is done by Dat2Jul. The reverse is done by Jul2Dat.
Christian W. Hoffmann <christian@echoffmann.ch>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | c(Jul2Dat(dd <- Dat2Jul( -4712,1,1) ) )
# -4712, 1, 1, 12; JD=0 i.e. Start of Julian day numbering
c(Jul2Dat(dd <- Dat2Jul( -1, 1, 1)),dd)
# -1, 1, 1, 12; JD=1720693 , start of last year BC
c(Jul2Dat(dd <- Dat2Jul( -1,12,31)),dd)
# -1, 12, 31, 12; JD=1721057 , last day BC
c(Jul2Dat(dd <- Dat2Jul( -0, 1, 1)),dd)
# 0, 1, 1, 12; JD=1721058 , first day AD
c(Jul2Dat(dd <- Dat2Jul( 1, 1 ,1)),dd)
# 1, 1, 1, 12; JD=1721424
c(Jul2Dat(dd <- Dat2Jul( 1582,10, 4 )),dd)
# 1582, 10, 4, 12; 2299160, last day of Julian calendar
c(Jul2Dat(dd <- Dat2Jul( 1582,10,15)),dd)
# 1582, 10, 15, 12; 2299161, first day of Gregorian calendar
round(c(Jul2Dat(dd <- Dat2Jul( 1582,10,15, 0.0168)),dd),1 )
# 1582, 10, 15, 12; 2299160.5 first day of Gregorian calendar
c(Jul2Dat(dd <- Dat2Jul( 2001,1,1)),dd)
# 2001, 1, 1, 12; 2451911
mdiny(1,TRUE) # 1 1
mdiny(60,TRUE) # 2 29
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.