ukui-screensaver/screensaver/chinesedate.h

74 lines
1.9 KiB
C
Raw Normal View History

/*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
**/
#ifndef CHINESEDATE_H
#define CHINESEDATE_H
#include <QString>
#include <QStringList>
class ChineseDate
{
public:
ChineseDate();
QString getDateLunar();
private:
/**
* @brief
* @param year
* @return
*/
int getYearDays(int year);
/**
* @brief
* @param year
* @return
*/
bool isLeapMonth(int year);
/**
* @brief
* @param year
* @return
*/
int getLeapMonthDays(int year);
/**
* @brief
* @param year
* @return
*/
int getLeapMonth(int year);
/**
* @brief
* @param year
* @param month
* @return
*/
int getYearMonthDays(int year,int month);
/**
* @brief
* @return
*/
QString getChineseDays(int month,int day,bool isleap);
QStringList ChineseMonth;
QStringList ChineseDay;
QStringList ChineseDays;
};
#endif // CHINESEDATE_H