daysPerMonth: Number of Days in the Month of the given Date

Description Usage Arguments Value Examples

View source: R/main.R

Description

Number of Days in the Month of the given Date

Usage

1

Arguments

date

date object

Value

(integer) number of days in the month of the given date

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# You may either pass a Date object...
daysPerMonth(as.Date("2010-01-04"))

# ... or a date string in yyyy-mm-dd format
daysPerMonth("2010-01-04")

# Number of days in February 2010
daysPerMonth("2010-02-01")

# Number of days in February 2012
daysPerMonth("2012-02-15")

KWB-R/kwb.datetime documentation built on July 9, 2021, 10:28 p.m.