julian_day
Convert Julian day number to date, or vice versa.
Syntax
n = julian_day(y,m,d) % Matlab & Octave n <- julian_day(y, m, d) # R
Description
Convert between dates and Julian day numbers. n = julian_day Returns the Julian day number for today. n = julian_day(y,d) where y is a single year or a vector of years and d is a single day number or a vector of day numbers Returns the date vector [year,month,day] for each year/day pair. n = julian_day(y,m,d) where y is a single year or a vector of years, m is a single month or vector of months, and d is a single month day or a vector of month days Returns the Julian day number for each year, month, day.
Inputs
Input var | Description | Default value |
---|---|---|
y | years | N/A |
m | months | N/A |
d | days | N/A |
Outputs
Output var | Description | Units |
---|---|---|
n | See Description for possible outputs for n | N/A |
Example
Matlab & Octave
julian_day(2016,10,12) n = 286 julian_day(2016,286) n = [2016,10,12]
R
julian_day(2016, 10, 12) n = 286 julian_day(2016, 286) n = "2016-10-12"
About
bugs@animaltags.org Last modified: 19 July 2017