Learn R Programming

inlmisc (version 0.5.5)

GetDaysInMonth: Get Number of Days in a Year and Month

Description

Calculate the number of days in a year and month.

Usage

GetDaysInMonth(x)

Arguments

x

'integer' vector. Year and month, with a required date format of YYYYMM.

Value

A 'integer' vector indicating the number of days for each year and month value in x.

Examples

Run this code
# NOT RUN {
GetDaysInMonth(c("199802", "199804", "200412"))

# }

Run the code above in your browser using DataLab