Learn R Programming

climtrends (version 1.0.6)

LastDayOfTheMonth: Get the last day of a month

Description

LastDayOfTheMonth returns the last day of a month, considering leap years too.

Usage

LastDayOfTheMonth(intMonth,intYear)

Arguments

intMonth
month 1-12
intYear
year

Value

last day of a month.

Examples

Run this code
LastDayOfTheMonth(2,2010)
LastDayOfTheMonth(2,2011)
LastDayOfTheMonth(2,2012)
LastDayOfTheMonth(2,2013)

Run the code above in your browser using DataLab