DayOfYear - Maple Help

Calendar

 DayOfYear
 compute the day of the year of a given date

 Calling Sequence DayOfYear( d ) DayOfYear( year, month, day )

Parameters

 d - Date ; the date whose day of the year is to be computed year - integer; the year month - posint; the month of the year day - posint; the day of the month

Description

 • The DayOfYear( d ) command computes the day of the year of the Date object d.
 • The DayOfYear( year, month, day ) command computes the day of the year for the day-th day of the month month (1..12) in the year year.
 • The day of the year of January 1 is equal to 1.  The last day of the year (December 31) is usually either $365$, for an ordinary year, or $366$ for a leap year.

Examples

 > $\mathrm{with}\left(\mathrm{Calendar}\right):$
 > $\mathrm{DayOfYear}\left(\mathrm{Date}\left(\right)\right)$
 ${68}$ (1)
 > $\mathrm{DayOfYear}\left(2000,1,1\right)$
 ${1}$ (2)
 > $\mathrm{DayOfYear}\left(2000,12,31\right)$
 ${366}$ (3)
 > $\mathrm{DayOfYear}\left(2100,12,31\right)$
 ${365}$ (4)
 > $\mathrm{DayOfYear}\left(1900,12,31\right)$
 ${365}$ (5)
 > $\mathrm{DayOfYear}\left(\mathrm{Date}\left(1900,12,31\right)\right)$
 ${365}$ (6)
 > $\mathrm{DayOfYear}\left(1582,12,31\right)$
 ${355}$ (7)
 > $\mathrm{DayOfYear}\left(1066,10,14\right)$
 ${287}$ (8)
 > $\mathrm{DayOfYear}\left(1066,12,25\right)$
 ${359}$ (9)

Compatibility

 • The Calendar[DayOfYear] command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.