// // Created by ioachim on 18.05.2025. // #include "Zi.h" ZiuaDeAzi* ZiuaDeAzi::instance = nullptr; ZiuaDeAzi* ZiuaDeAzi::getInstance() { if (instance == nullptr) { //std::lock_guard lock(mtx); //if (instance == nullptr) { instance = new ZiuaDeAzi(); //} } return instance; } bool Zi::verifExpirare() const { ZiuaDeAzi* x = ZiuaDeAzi::getInstance(); Zi currentDate = x->getZiuaDeAzi(); return currentDate.year > year || (currentDate.year == year && currentDate.month > month) || (currentDate.year == year && currentDate.month == month && currentDate.day > day); } Zi::Zi(int day, int month, int year) : day(day), month(month), year(year) {} void ZiuaDeAzi::setZiuaDeAzi(Zi _z) { z = _z; } Zi ZiuaDeAzi::getZiuaDeAzi() { return z; }