I have column - Month, and there are few months, I need to find out the number of day in that month.
I need to find the number of days in a month considering the leap year and that the month can go to June 2019, or current month. The logic should be applied on the column.
MONTH no_of_days
Jan,2017
Feb,2017
Mar,2017
Apr,2017
May,2017
Jun,2017
Jul,2017
Aug,2017
Sep,2017
Oct,2017
Nov,2017
Dec,2017
structure(list(MONTH = structure(c(9L, 7L, 15L, 1L, 17L, 13L, 11L, 3L, 23L, 21L, 19L, 5L, 10L, 8L, 16L, 2L, 18L, 14L, 12L, 4L, 24L, 22L, 20L, 6L), .Label = c("Apr,2017", "Apr,2018", "Aug,2017", "Aug,2018", "Dec,2017", "Dec,2018", "Feb,2017", "Feb,2018", "Jan,2017", "Jan,2018", "Jul,2017", "Jul,2018", "Jun,2017", "Jun,2018", "Mar,2017", "Mar,2018", "May,2017", "May,2018", "Nov,2017", "Nov,2018", "Oct,2017", "Oct,2018", "Sep,2017", "Sep,2018"), class = "factor")), class = "data.frame", row.names = c(NA, -24L))