void RunLog::remove( string& info ) { m_Log->remove( getDateDB(), info ); m_Log->removeStats( getCurrentWeekString(),getMonthString(), info ); if( m_Loops->contains( m_Log->getSecondItem( info ) ) ) m_Log->remove2ndItemStats( getDateDB(), info ); }
/*! * \brief Get the date in the game * \todo deal with phenomenally big dates * \param temp buffer to put date string into * \return the temp buffer (silli!) */ char * getDate(char *temp) { Char month[10]; sprintf(temp, "%s %ld", getMonthString( (UInt16)(getMonthsElapsed() % 12), month, (UInt16)9), (long)((getMonthsElapsed() / 12) + 2000)); return ((char *)temp); }
QString CrCalendar::generateMonthTitle() { QString str; QDate daysIterator; QDate actualMonth = QDate(_dateFirst.year(),_dateFirst.month(),1); int daysCount = 0; if(_dateFirst.month() == _dateLast.month() && _dateFirst.year() == _dateLast.year()) { str += "<td colspan=\""+ QString::number(_dateFirst.daysTo(_dateLast.addDays(1)))+"\"";; str += " class=\""+ Cell::getCssClassAsString(Cell::month_title) +"\">"; str += getMonthString(_dateFirst.month()); str += " "; str += _dateFirst.toString("yyyy"); str += "</td>\n"; } else { for(daysIterator = _dateFirst; daysIterator.operator <=(_dateLast); daysIterator = daysIterator.addDays(1)) { if(daysIterator.operator ==(QDate(daysIterator.year(), daysIterator.month(),daysIterator.daysInMonth())) || daysIterator.operator ==(_dateLast)) { str += "<td colspan=\""+ QString::number(++daysCount) +"\""; str += " class=\""+ Cell::getCssClassAsString(Cell::month_title) + "\">"; str += getMonthString(actualMonth.month()); str += " "; str += actualMonth.toString("yyyy"); str += "</td>\n"; daysCount = 0; actualMonth = actualMonth.addMonths(1); } else { daysCount++; } } } return str; }