mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
ddate: Port to LibMain
This commit is contained in:
parent
208d85e707
commit
156899a63f
2 changed files with 5 additions and 6 deletions
|
@ -6,7 +6,8 @@
|
|||
|
||||
#include <AK/String.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <stdio.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <unistd.h>
|
||||
|
||||
class DiscordianDate {
|
||||
|
@ -99,12 +100,9 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
if (pledge("stdio", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
TRY(Core::System::pledge("stdio"));
|
||||
|
||||
auto date = Core::DateTime::now();
|
||||
outln("Today is {}", DiscordianDate(date).to_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue