using System.Collections.Generic;
string ReturnDate(DateTime applicationDate);
public class localTimeClass : IDateConvert
public string ReturnDate(DateTime applicationDate)
var jTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Tokyo standrad Time");
var jTime = TimeZoneInfo.ConvertTimeFromUtc(applicationDate, jTimeZone);
jTime = jTime.AddHours(2);
return jTime.ToString("yyyy-MM-dd");
public static void Main()
arrays valid Plans and display the results, Expect result display "Plan: BY1,BY2"
bool isNotPolicyholderSameAsInsured = false;
DateTime travelStartDate = new DateTime(2024, 03, 19);
DateTime travelEndDate = new DateTime(2024, 04, 19);
Plans[] validPlans = ShowValidPlans(isNotPolicyholderSameAsInsured, travelStartDate,
Console.WriteLine("Valid Plans:");
foreach (Plans plan in validPlans)
Console.WriteLine("Plan: " + plan);
localTimeClass localTimeInstance = new localTimeClass();
DateTime applicationDate = DateTime.Parse("2024-03-17T13:18:27.5834001z");
string japanLocalTime = localTimeInstance.ReturnDate(applicationDate);
Console.WriteLine("Japan Local Time: " + japanLocalTime);
public static Plans[] ShowValidPlans(bool isNotPolicyholderSameAsInsured, DateTime TravelStartDate,
Plans[] plans = {Plans.CL1, Plans.BY1, Plans.BY2, Plans.AL3};