# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

# days360isda

Days between dates based on 360-day year (International Swap Dealer Association (ISDA) compliant)

## Syntax

• ``NumDays = days360isda(StartDate,EndDate)``
example

## Description

example

````NumDays = days360isda(StartDate,EndDate)` returns the number of days between `StartDate` and `EndDate` based on a 360-day year (that is, all months contain 30 days) and is International Swap Dealer Association (ISDA) compliant. If `EndDate` is earlier than `StartDate`, `NumDays` is negative. Under this convention, all months contain 30 days.Either input argument can contain multiple values, but if so, the other must contain the same number of values or a single value that applies to all. For example, if `StartDate` is an `N`-row character array of date character vectors, then `EndDate` must be an `N`-by-`1` vector of integers or a single integer. `NumDays` is then an `N`-by-`1` vector of date numbers. ```

## Examples

collapse all

Determine the `NumDays` using date character vectors for `StartDate` and `EndDate` for the month of January.

```StartDate = '1-Jan-2002'; EndDate = '1-Feb-2002'; NumDays = days360isda(StartDate, EndDate) ```
```NumDays = 30 ```

Determine the `NumDays` in the month of January using a datetime array for `StartDate`.

```NumDays = days360isda(datetime('1-Jan-2002','Locale','en_US'), '1-Feb-2002') ```
```NumDays = 30 ```

Determine the `NumDays` using a vector for `EndDate`.

```MoreDays = ['15-mar-2000'; '15-apr-2000'; '15-jun-2000']; NumDays = days360isda('15-jan-2000', MoreDays) ```
```NumDays = 60 90 150 ```

## Input Arguments

collapse all

Start date, specified as a scalar or an `N`-by-`1` or `1`-by-`N` vector using serial date numbers, date character vectors, or datetime arrays.

Data Types: `double` | `char` | `datetime`

End date, specified as a scalar or an `N`-by-`1` or `1`-by-`N` vector using serial date numbers, date character vectors, or datetime arrays.

Data Types: `double` | `char` | `datetime`

## Output Arguments

collapse all

Number of days between two dates given a basis of 30/360 based on International Swap Dealer Association (ISDA) compliance, returned as a scalar or an `N`-by-`1` or `1`-by-`N` vector containing the number of days.

`NumDays` returns as a double for serial date number, date character vector, or datetime inputs for `StartDate` and `EndDate`.

## References

Addendum to Securities Industry Association, Standard Securities Calculation Methods: Fixed Income Securities Formulas for Analytic Measures. Vol. 2, Spring 1995.