From 5ce71387b57592dcabc0a468bb00de1e8b11d4a0 Mon Sep 17 00:00:00 2001 From: Prashanthi Alemette Sivanarayana Date: Fri, 8 Nov 2024 15:11:48 -0500 Subject: [PATCH 1/3] Payment changes replacing last month check with 45 days check --- .../P520GenerateAllowancePaymentProvider.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs index b99b710..033c821 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs @@ -413,7 +413,8 @@ private async Task ProcessTransportationPayments(Application baseApp { if (approvedSA.ofm_allowance_type == ecc_allowance_type.Transportation) { - if ((approvedSA.ofm_start_date.Value.Month == firstAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == firstAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == secondAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == secondAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == fundingEndDate?.Month && approvedSA.ofm_start_date.Value.Year == fundingEndDate?.Year)) + if (CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value,firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value)) + { int retroActiveMonthsCount = approvedSA.ofm_retroactive_date!.HasValue ? (approvedSA.ofm_start_date.Value.Year - approvedSA.ofm_retroactive_date!.Value.Year) * 12 + approvedSA.ofm_start_date.Value.Month - approvedSA.ofm_retroactive_date.Value.Month : 0; decimal retroActiveAmount = retroActiveMonthsCount > 0 ? approvedSA.ofm_monthly_amount!.Value * retroActiveMonthsCount : 0; @@ -484,13 +485,13 @@ private async Task CreateSinglePayment(SupplementaryApplication appr DateTime secondAnniversaryDate, DateTime? fundingEndDate) { - DateTime invoiceDate = ((approvedSA.ofm_start_date.Value.Month == firstAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == firstAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == secondAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == secondAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == fundingEndDate?.Month && approvedSA.ofm_start_date.Value.Year == fundingEndDate?.Year)) ? paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList) : (paymentDate == approvedSA.ofm_start_date!.Value) ? paymentDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); + DateTime invoiceDate = ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value)) ? paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList) : (paymentDate == approvedSA.ofm_start_date!.Value) ? paymentDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays)); DateTime invoiceReceivedDate = invoiceDate.AddBusinessDays(_BCCASApi.PayableInDays, holidaysList); DateTime effectiveDate = invoiceDate; - if (approvedSA.ofm_retroactive_date is not null && !(approvedSA.ofm_start_date.Value.Month == firstAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == firstAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == secondAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == secondAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == fundingEndDate?.Month && approvedSA.ofm_start_date.Value.Year == fundingEndDate?.Year)) + if (approvedSA.ofm_retroactive_date is not null && !(CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { // Date calculation logic is different for mid-year supp application. Overriding regular date logic above // Invoice received date is always the last business date of previous month except for first payment of the First funding year, it is 5 business day after the last business day of the last month. @@ -551,13 +552,13 @@ private async Task CreatePaymentsInBatch(Application baseApplication for (DateTime paymentDate = startDate; paymentDate <= endDate; paymentDate = paymentDate.AddMonths(1)) { - DateTime invoiceDate = ((approvedSA.ofm_start_date.Value.Month == firstAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == firstAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == secondAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == secondAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == fundingEndDate?.Month && approvedSA.ofm_start_date.Value.Year == fundingEndDate?.Year)) ? paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList) : (paymentDate == startDate) ? startDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); + DateTime invoiceDate = ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value)) ? paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList) : (paymentDate == startDate) ? startDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays)); DateTime invoiceReceivedDate = invoiceDate.AddBusinessDays(_BCCASApi.PayableInDays, holidaysList); DateTime effectiveDate = invoiceDate; - if (approvedSA.ofm_retroactive_date is not null && !(approvedSA.ofm_start_date.Value.Month == firstAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == firstAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == secondAnniversaryDate.Month && approvedSA.ofm_start_date.Value.Year == secondAnniversaryDate.Year) || (approvedSA.ofm_start_date.Value.Month == fundingEndDate?.Month && approvedSA.ofm_start_date.Value.Year == fundingEndDate?.Year)) + if (approvedSA.ofm_retroactive_date is not null && !(CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { // Date calculation logic is different for mid-year supp application. Overriding regular date logic above // Invoice received date is always the last business date of previous month except for first payment of the First funding year, it is 5 business day after the last business day of the last month. @@ -614,5 +615,12 @@ private async Task GetNextInvoiceLineNumber() return await Task.FromResult(nextLineNumber); } + + private static bool CheckSubmissionIsWithinLast45days(DateTime submittedDate, DateTime anniversayDate) + { + DateTime cutoffDate = anniversayDate.AddDays(-45); + + return submittedDate >= cutoffDate; + } } } \ No newline at end of file From d5571f29bfad57687d440eb3574004c5ecae336b Mon Sep 17 00:00:00 2001 From: Prashanthi Alemette Sivanarayana Date: Fri, 8 Nov 2024 15:51:55 -0500 Subject: [PATCH 2/3] Changes for invoice received --- .../P520GenerateAllowancePaymentProvider.cs | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs index 033c821..bfc3032 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs @@ -485,11 +485,16 @@ private async Task CreateSinglePayment(SupplementaryApplication appr DateTime secondAnniversaryDate, DateTime? fundingEndDate) { - DateTime invoiceDate = ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value)) ? paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList) : (paymentDate == approvedSA.ofm_start_date!.Value) ? paymentDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays)); + DateTime invoiceDate = (paymentDate == approvedSA.ofm_start_date!.Value) ? paymentDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); DateTime invoiceReceivedDate = invoiceDate.AddBusinessDays(_BCCASApi.PayableInDays, holidaysList); DateTime effectiveDate = invoiceDate; - - + //this applies if supplementary application is submitted within 45 days. + if ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) + { + invoiceReceivedDate = paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList); + invoiceDate = invoiceReceivedDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); + effectiveDate = invoiceDate; + } if (approvedSA.ofm_retroactive_date is not null && !(CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { @@ -500,7 +505,7 @@ private async Task CreateSinglePayment(SupplementaryApplication appr effectiveDate = invoiceDate; } - Guid fiscalYear = invoiceDate.AddMonths(-1).MatchFiscalYear(fiscalYears); + Guid fiscalYear = paymentDate.MatchFiscalYear(fiscalYears); var payload = new JsonObject() { @@ -552,11 +557,16 @@ private async Task CreatePaymentsInBatch(Application baseApplication for (DateTime paymentDate = startDate; paymentDate <= endDate; paymentDate = paymentDate.AddMonths(1)) { - DateTime invoiceDate = ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value)) ? paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList) : (paymentDate == startDate) ? startDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays)); + DateTime invoiceDate = (paymentDate == startDate) ? startDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); DateTime invoiceReceivedDate = invoiceDate.AddBusinessDays(_BCCASApi.PayableInDays, holidaysList); DateTime effectiveDate = invoiceDate; - - + //this applies if supplementary application is submitted within 45 days. + if ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) + { + invoiceReceivedDate = paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList); + invoiceDate = invoiceReceivedDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); + effectiveDate = invoiceDate; + } if (approvedSA.ofm_retroactive_date is not null && !(CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { @@ -567,7 +577,7 @@ private async Task CreatePaymentsInBatch(Application baseApplication effectiveDate = invoiceDate; } - Guid? fiscalYear = invoiceDate.AddMonths(-1).MatchFiscalYear(fiscalYears); + Guid? fiscalYear = startDate.MatchFiscalYear(fiscalYears); var paymentToCreate = new JsonObject() { { "ofm_invoice_line_number", nextLineNumber++ }, From 099ce9af6b982fe56d6b7d91a3c867ff5a4622cc Mon Sep 17 00:00:00 2001 From: yiyiwang-cgi Date: Fri, 8 Nov 2024 14:30:51 -0800 Subject: [PATCH 3/3] Adding new logic to pay following month from last 45 day to last 30 day --- .../Extensions/TimeExtensions.cs | 14 +++++++ .../P520GenerateAllowancePaymentProvider.cs | 39 +++++++++++++++---- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/OFM.Infrastructure.WebAPI/Extensions/TimeExtensions.cs b/OFM.Infrastructure.WebAPI/Extensions/TimeExtensions.cs index b155200..7024d1b 100644 --- a/OFM.Infrastructure.WebAPI/Extensions/TimeExtensions.cs +++ b/OFM.Infrastructure.WebAPI/Extensions/TimeExtensions.cs @@ -200,6 +200,20 @@ public static DateTime GetLastBusinessDayOfPaymentMonth(this DateTime PaymentDat return lastDayOfPaymentMonth; } + + public static DateTime GetFirstDayOfFollowingMonth(this DateTime PaymentDate, List holidays) + { + DateTime firstDayOfNextMonth = new DateTime(PaymentDate.Year, PaymentDate.Month, 1).AddMonths(1); + // Iterate backward to find the last business day of that payment month. + while (firstDayOfNextMonth.DayOfWeek == DayOfWeek.Saturday || + firstDayOfNextMonth.DayOfWeek == DayOfWeek.Sunday || + holidays.Exists(excludedDate => excludedDate.Date.Equals(firstDayOfNextMonth.Date))) + { + firstDayOfNextMonth = firstDayOfNextMonth.AddDays(1); + } + return firstDayOfNextMonth; + } + public static DateTime GetFirstDayOfFollowingNextMonth(this DateTime PaymentDate, List holidays) { DateTime firstDayOfNextMonth = new DateTime(PaymentDate.Year, PaymentDate.Month, 1).AddMonths(2); diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs index bfc3032..32bc4d5 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P520GenerateAllowancePaymentProvider.cs @@ -488,15 +488,23 @@ private async Task CreateSinglePayment(SupplementaryApplication appr DateTime invoiceDate = (paymentDate == approvedSA.ofm_start_date!.Value) ? paymentDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); DateTime invoiceReceivedDate = invoiceDate.AddBusinessDays(_BCCASApi.PayableInDays, holidaysList); DateTime effectiveDate = invoiceDate; - //this applies if supplementary application is submitted within 45 days. - if ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) + //this applies if supplementary application is submitted within last 45 days to last 30 days. + + if ((CheckSubmissionIsWithinLastMonth(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLastMonth(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLastMonth(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { - invoiceReceivedDate = paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList); - invoiceDate = invoiceReceivedDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); - effectiveDate = invoiceDate; + invoiceReceivedDate = paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList); + invoiceDate = invoiceReceivedDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); + effectiveDate = invoiceDate; + } + else if ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) + { + invoiceReceivedDate = paymentDate.GetFirstDayOfFollowingMonth(holidaysList); + invoiceDate = invoiceReceivedDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); + effectiveDate = invoiceDate; } - if (approvedSA.ofm_retroactive_date is not null && !(CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) + + if (approvedSA.ofm_retroactive_date is not null && !(CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { // Date calculation logic is different for mid-year supp application. Overriding regular date logic above // Invoice received date is always the last business date of previous month except for first payment of the First funding year, it is 5 business day after the last business day of the last month. @@ -560,14 +568,21 @@ private async Task CreatePaymentsInBatch(Application baseApplication DateTime invoiceDate = (paymentDate == startDate) ? startDate.GetLastBusinessDayOfThePreviousMonth(holidaysList) : paymentDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); DateTime invoiceReceivedDate = invoiceDate.AddBusinessDays(_BCCASApi.PayableInDays, holidaysList); DateTime effectiveDate = invoiceDate; + //this applies if supplementary application is submitted within 45 days. - if ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) + if ((CheckSubmissionIsWithinLastMonth(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLastMonth(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLastMonth(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { invoiceReceivedDate = paymentDate.GetFirstDayOfFollowingNextMonth(holidaysList); invoiceDate = invoiceReceivedDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); effectiveDate = invoiceDate; + }else if ((CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) + { + invoiceReceivedDate = paymentDate.GetFirstDayOfFollowingMonth(holidaysList); + invoiceDate = invoiceReceivedDate.GetCFSInvoiceDate(holidaysList, _BCCASApi.PayableInDays); + effectiveDate = invoiceDate; } + if (approvedSA.ofm_retroactive_date is not null && !(CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, firstAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, secondAnniversaryDate) || CheckSubmissionIsWithinLast45days(approvedSA.ofm_submittedon.Value, fundingEndDate.Value))) { // Date calculation logic is different for mid-year supp application. Overriding regular date logic above @@ -628,9 +643,17 @@ private async Task GetNextInvoiceLineNumber() private static bool CheckSubmissionIsWithinLast45days(DateTime submittedDate, DateTime anniversayDate) { - DateTime cutoffDate = anniversayDate.AddDays(-45); + DateTime temp = anniversayDate.AddMonths(-1); + DateTime cutoffDate = new DateTime(temp.Year, temp.Month, 15, 0, 0, 0).ToUTC(); return submittedDate >= cutoffDate; } + + private static bool CheckSubmissionIsWithinLastMonth(DateTime submittedDate, DateTime anniversayDate) + { + DateTime temp = submittedDate.ToUniversalTime(); + + return temp.Year == anniversayDate.Year && temp.Month == anniversayDate.Month; + } } } \ No newline at end of file