lists:foldl(fun get_n_month_date_list_fold/2, [], DateRange).

get_n_month_date_list_fold({Year,Month}, Acc) ->
    [{Year,Month,Day}
     || Day <- lists:seq(calendar:last_day_of_the_month(Year,Month), 1, -1)
    ] ++ Acc.