namespace ConsoleApp_Funtions2
public static bool IsLeapYear(int year)
if (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))
public static int TimSoNgayTrongThang(int Thang, int Nam)
if (IsLeapYear(Nam)) kq = 29;
public static void TimNgayKeTiep(int ngay, int thang, int nam, ref int ngayke, ref int thangke, ref int namke)
int ngay_Thang = TimSoNgayTrongThang(thang, nam);
static void Main(string[] args)
XL_Date.TimNgayKeTiep(ngay, thang, nam, ref ngayke, ref thangke, ref namke);
Console.WriteLine($"Ngay hien tai: {ngay}-{thang}-{nam}");
Console.WriteLine($"Ngay ke tiep: {ngayke}-{thangke}-{namke}");