获取当月最大天数
udf_max_mon_d <- function(date)
{
m<-format(date,format="%m")
days31<-c("01","03","05","07","08","10","12")
days30<-c("04","06","09","11")
days28<-c("02")
if(m %in% days31) return(31)
if(m %in% days30) return(30)
if(m %in% days28) return(28)
}
网友评论