comparison src/core/date.cc @ 175:9b10175be389

dep/json: update to v3.11.3 anime/db: save anime list to database, very much untested and likely won't work as intended
author Paper <mrpapersonic@gmail.com>
date Thu, 30 Nov 2023 13:52:26 -0500
parents f88eda79c60a
children 9613d72b097e
comparison
equal deleted inserted replaced
174:f88eda79c60a 175:9b10175be389
28 SetMonth(date.month()); 28 SetMonth(date.month());
29 SetDay(date.day()); 29 SetDay(date.day());
30 } 30 }
31 31
32 Date::Date(const nlohmann::json& json) { 32 Date::Date(const nlohmann::json& json) {
33 /* NOTE: this constructor is made for use with
34 AniList FussyDate-style JSON. In the future, some other
35 methods may be parsed and whatnot if necessary. */
33 if (json.contains("year") && json.at("year").is_number()) 36 if (json.contains("year") && json.at("year").is_number())
34 SetYear(json.at("year").get<unsigned int>()); 37 SetYear(json.at("year").get<unsigned int>());
35 if (json.contains("month") && json.at("month").is_number()) 38 if (json.contains("month") && json.at("month").is_number())
36 SetMonth(json.at("month").get<unsigned int>()); 39 SetMonth(json.at("month").get<unsigned int>());
37 if (json.contains("day") && json.at("day").is_number()) 40 if (json.contains("day") && json.at("day").is_number())