Mercurial > minori
comparison src/core/date.cc @ 389:1e5d922fe82b default tip
kitsu: implement UpdateAnimeEntry
yay... i guess
| author | Paper <paper@tflc.us> |
|---|---|
| date | Thu, 06 Nov 2025 12:21:35 -0500 |
| parents | 47c9f8502269 |
| children |
comparison
equal
deleted
inserted
replaced
| 388:83aa0ddd1a46 | 389:1e5d922fe82b |
|---|---|
| 152 if (day) | 152 if (day) |
| 153 json["day"] = static_cast<unsigned char>(day.value()); | 153 json["day"] = static_cast<unsigned char>(day.value()); |
| 154 | 154 |
| 155 return json; | 155 return json; |
| 156 } | 156 } |
| 157 | |
| 158 std::string Date::GetAsISO8601() const | |
| 159 { | |
| 160 std::stringstream res; | |
| 161 | |
| 162 res << year.value_or(2000); | |
| 163 res << '-'; | |
| 164 res << (static_cast<int>(month.value_or(Date::Month::Jan)) + 1); | |
| 165 res << '-'; | |
| 166 res << day.value_or(1); | |
| 167 | |
| 168 /* fake the rest... */ | |
| 169 res << "T00:00:00.000Z"; | |
| 170 | |
| 171 return res.str(); | |
| 172 } |
