Help Center
Number of days in year
Days = yeardays(Year)
Days = yeardays(___,Basis)
Days = yeardays(Year) returns the number of days in the given Year.
Days
Year
example
Days = yeardays(___,Basis) returns the number of days in the given Year, based on the optional argument Basis for day-count.
Basis
collapse all
Find the number of days in a given Year.
Days = yeardays(2000)
Days = 366
Find the number of days in a given Year using the optional argument Basis.
Days = yeardays(2000, 1)
Days = 360
Data Types: single | double
single
double
0
1
2
3
4
5
6
7
8
9
10
11
12
13
Day-count basis, specified as a vector of integers with values 0,1,2,3,4,5,6,7,8,9,10,11,12,13.
0 = actual/actual (default)
1 = 30/360 (SIA)
2 = actual/360
3 = actual/365
4 = 30/360 (BMA)
5 = 30/360 (ISDA)
6 = 30/360 (European)
7 = actual/365 (Japanese)
8 = actual/actual (ICMA)
9 = actual/360 (ICMA)
10 = actual/365 (ICMA)
11 = 30/360E (ICMA)
12 = actual/365 (ISDA)
13 = BUS/252
For more information, see Basis.
Number of days in given Year, returned as a nonnegative integer.
Introduced before R2006a
days360 | days365 | daysact | yearfrac
days360
days365
daysact
yearfrac
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office