|
@@ -280,6 +280,12 @@ String DateTime::to_string(const String& format) const
|
|
return builder.build();
|
|
return builder.build();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+bool DateTime::is_before(const String& other) const
|
|
|
|
+{
|
|
|
|
+ auto now_string = String::format("%04d%02d%02d%02d%02d%02dZ", year(), month(), weekday(), hour(), minute(), second());
|
|
|
|
+ return __builtin_strcasecmp(now_string.characters(), other.characters()) < 0;
|
|
|
|
+}
|
|
|
|
+
|
|
const LogStream& operator<<(const LogStream& stream, const DateTime& value)
|
|
const LogStream& operator<<(const LogStream& stream, const DateTime& value)
|
|
{
|
|
{
|
|
return stream << value.to_string();
|
|
return stream << value.to_string();
|