From c3342aa81fabe01d70520a987bd15b018eb117ce Mon Sep 17 00:00:00 2001 From: ydong10 Date: Tue, 5 Jul 2011 09:30:49 +0000 Subject: correct leap year calculate method. Signed-off-by:ydong10 Reviewed-by:hhtian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11982 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c index d31a9b9ddc..8f3b9e72dc 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c @@ -302,8 +302,8 @@ GetNumericInput ( switch (QuestionValue->Value.date.Month) { case 2: if ((QuestionValue->Value.date.Year % 4) == 0 && - (QuestionValue->Value.date.Year % 100) != 0 && - (QuestionValue->Value.date.Year % 400) == 0) { + ((QuestionValue->Value.date.Year % 100) != 0 || + (QuestionValue->Value.date.Year % 400) == 0)) { Maximum = 29; } else { Maximum = 28; -- cgit v1.2.3