korganizer Library API Documentation

converter.h

00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Jonathan Singer * 00003 * jsinger@leeta.net * 00004 * Calendar routines from Hebrew Calendar by Frank Yellin * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 ***************************************************************************/ 00011 #ifndef CONVERTER_H 00012 #define CONVERTER_H 00013 00014 #include <qstring.h> 00015 #include <qstringlist.h> 00016 00017 struct DateResult 00018 { 00019 int year; 00020 int month; 00021 int day; 00022 int day_of_week; 00023 00024 int hebrew_month_length, secular_month_length; 00025 bool hebrew_leap_year_p, secular_leap_year_p; 00026 int kvia; 00027 int hebrew_day_number; 00028 }; 00029 00033 class Converter 00034 { 00035 public: 00036 00037 Converter(); 00038 ~Converter(); 00039 00040 static bool hebrew_leap_year_p(int year); 00041 static bool gregorian_leap_year_p(int year); 00042 00043 static long absolute_from_gregorian(int year, int month, int day); 00044 static long absolute_from_hebrew(int year, int month, int day); 00045 00046 static void gregorian_from_absolute(long date, int *yearp, 00047 int *monthp, int *dayp); 00048 static void hebrew_from_absolute(long date, int *yearp, int *monthp, 00049 int *dayp); 00050 00051 static int hebrew_months_in_year(int year); 00052 static int hebrew_month_length(int year, int month); 00053 static int secular_month_length(int year, int month); 00054 00055 static long hebrew_elapsed_days(int year); 00056 static long hebrew_elapsed_days2(int year); 00057 static int hebrew_year_length(int year); 00058 00059 static void finish_up(long absolute, int hyear, int hmonth, 00060 int syear, int smonth, 00061 struct DateResult *result); 00062 00063 static void SecularToHebrewConversion(int year, int month, int day, 00064 struct DateResult *result); 00065 static void HebrewToSecularConversion(int year, int month, int day, 00066 struct DateResult *result); 00067 00068 private: 00069 00070 static QStringList HebrewMonthNames; 00071 static QStringList SecularMonthNames; 00072 00073 }; 00074 00075 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:55 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003