mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibCore: Add a primitive comparison function to DateTime
This should go away when we get the ability to parse strings to DateTime's.
This commit is contained in:
committed by
Andreas Kling
parent
3df3ab4598
commit
d051fffe25
Notes:
sideshowbarker
2024-07-19 06:55:17 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/d051fffe25b Pull-request: https://github.com/SerenityOS/serenity/pull/2135 Reviewed-by: https://github.com/awesomekling
@@ -54,6 +54,10 @@ public:
|
||||
static DateTime now();
|
||||
static DateTime from_timestamp(time_t);
|
||||
|
||||
// FIXME: This should be replaced with a proper comparison
|
||||
// operator when we get the equivalent of strptime
|
||||
bool is_before(const String&) const;
|
||||
|
||||
private:
|
||||
time_t m_timestamp { 0 };
|
||||
unsigned m_year { 0 };
|
||||
|
||||
Reference in New Issue
Block a user