Mercurial > minori
diff src/core/date.cc @ 319:d928ec7b6a0d
services/kitsu: implement GetAnimeList()
it finally works!
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 12 Jun 2024 17:52:26 -0400 |
parents | b1f4d1867ab1 |
children |
line wrap: on
line diff
--- a/src/core/date.cc Wed Jun 12 05:25:41 2024 -0400 +++ b/src/core/date.cc Wed Jun 12 17:52:26 2024 -0400 @@ -1,4 +1,5 @@ #include "core/date.h" +#include "core/time.h" #include "core/json.h" #include <QDate> @@ -64,6 +65,10 @@ SetDay(json.at("/day"_json_pointer).get<unsigned char>()); } +Date::Date(Time::Timestamp timestamp) { + Date(QDateTime::fromSecsSinceEpoch(timestamp).date()); +} + void Date::VoidYear() { year.reset(); }