Accelerating the pace of engineering and science

# Documentation

### Contents

Date away from starting date for any day-count basis

## Syntax

```NumDays = daysadd(StartDate, NumDays, Basis)
```

## Arguments

 StartDate Start date. Enter as serial date numbers or date strings. NumDays Integer number of days from start date. Enter a negative integer for dates before start date. Basis (Optional) Day-count basis of the instrument. A vector of integers. 0 = actual/actual (default)1 = 30/360 (SIA)2 = actual/3603 = actual/3654 = 30/360 (PSA)5 = 30/360 (ISDA)6 = 30/360 (European)7 = actual/365 (Japanese)8 = actual/actual (ISMA)9 = actual/360 (ISMA)10 = actual/365 (ISMA)11 = 30/360E (ISMA) 12 = actual/365 (ISDA)13 = BUS/252For more information, see basis.

 Note   When using the 30/360 day-count basis, it is not always possible to find the exact date NumDays number of days away because of a known discontinuity in the method of counting days. A warning is displayed if this occurs.

## Description

NumDays = daysadd(StartDate, NumDays, Basis) returns a date NumDays number of days away from StartDate, using the given day-count basis.

## Examples

`NewDate = daysadd('01-Feb-2004', 31)`
```NewDate =

732009
```
`datestr(NewDate)`
```ans =

03-Mar-2004```
`NewDate = daysadd('01-Feb-2004', 31, 1)`
```NewDate =

732008```
`datestr(NewDate)`
```ans =

02-Mar-2004
```

## References

Stigum, Marcia L. and Franklin Robinson, Money Market and Bond Calculations, Richard D. Irwin, 1996, ISBN 1-55623-476-7