From 0586bb7300d930d7898cd92f0de9d067caa4c9c8 Mon Sep 17 00:00:00 2001 From: Jason Harris Date: Sat, 17 Feb 2007 23:25:03 +0000 Subject: [PATCH] Fix subtle bug in JDToGregorian() that was causing off-by-one date errors. CCMAIL: kstars-devel@kde.org svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=634683 --- extdate/extdatetime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extdate/extdatetime.cpp b/extdate/extdatetime.cpp index ac5c540..cb5d659 100644 --- a/extdate/extdatetime.cpp +++ b/extdate/extdatetime.cpp @@ -147,7 +147,7 @@ void ExtDate::JDToGregorian( long int jd, int &year, int &month, int &day ) float g; int z, a, b, c; - z = jd - 1721118; + z = int(jd - 1721118.5); g = z - 0.25; a = int(floor( g / 36524.25 )); -- 2.47.3