Пример #1
0
void Calendar::getCurrentDate(int& DD, int& MM, int& YYYY) {
  if(crtCalendarType == indian)
    toIndian();

  DD = this->DD;
  MM = this->MM;
  YYYY = this->YYYY;

  toGregorian();
}
Пример #2
0
QPersianDateTime::QPersianDateTime(quint16 year_, quint8 month_, quint8 day_, Type type)
    :year(year_),month(month_),day(day_)
{
    if( type == PERSIAN )
        toGregorian();
    else
    {
        gDateTime.setDate(QDate(year,month,day));
        toPersian();
    }
    gDateTime.setTime(QTime(0,0,0));
}