Mercurial > minori
comparison include/core/date.h @ 327:b5d6c27c308f
anime: refactor Anime::SeriesSeason to Season class
ToLocalString has also been altered to take in both season
and year because lots of locales actually treat formatting
seasons differently! most notably is Russian which adds a
suffix at the end to notate seasons(??)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 13 Jun 2024 01:49:18 -0400 |
parents | d928ec7b6a0d |
children |
comparison
equal
deleted
inserted
replaced
326:10096c5489e3 | 327:b5d6c27c308f |
---|---|
38 Date(Year y, Month m, Day d); | 38 Date(Year y, Month m, Day d); |
39 Date(const std::string& str); | 39 Date(const std::string& str); |
40 Date(const QDate& date); | 40 Date(const QDate& date); |
41 Date(const nlohmann::json& json); | 41 Date(const nlohmann::json& json); |
42 Date(Time::Timestamp timestamp); | 42 Date(Time::Timestamp timestamp); |
43 | |
43 bool IsValid() const; | 44 bool IsValid() const; |
45 | |
44 void SetYear(Year y); | 46 void SetYear(Year y); |
45 void SetMonth(Month m); | 47 void SetMonth(Month m); |
46 void SetDay(Day d); | 48 void SetDay(Day d); |
49 | |
47 void VoidYear(); | 50 void VoidYear(); |
48 void VoidMonth(); | 51 void VoidMonth(); |
49 void VoidDay(); | 52 void VoidDay(); |
53 | |
50 std::optional<Year> GetYear() const; | 54 std::optional<Year> GetYear() const; |
51 std::optional<Month> GetMonth() const; | 55 std::optional<Month> GetMonth() const; |
52 std::optional<Day> GetDay() const; | 56 std::optional<Day> GetDay() const; |
53 QDate GetAsQDate() const; | 57 QDate GetAsQDate() const; |
54 nlohmann::json GetAsAniListJson() const; | 58 nlohmann::json GetAsAniListJson() const; |