LibCore: Remove DateTime::to_string() and to_byte_string()
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Tomasz Strejczek 2025-06-19 21:27:53 +02:00 committed by Andrew Kaster
commit 7278a17e87
Notes: github-actions[bot] 2025-06-20 00:44:06 +00:00
2 changed files with 0 additions and 239 deletions

View file

@ -33,42 +33,6 @@ public:
void set_time_only(int hour, int minute, Optional<int> second = {});
void set_date(Core::DateTime const& other);
enum class LocalTime {
Yes,
No,
};
// %a: require short day name
// %A: require long day name
// %h/b: require short month name
// %B: require long month name
// %C: require short year number (hundreds) (ex: 19 -> 1900)
// %d: require day number
// %D: require month number/day number/short year number (ex: 12/31/24)
// %e: require day number
// %H: require hour (24h format)
// %I: require hour (12h format)
// %j: require defining date with day number ? (not sure)
// %m: require set to month entred - 1
// %M: require minutes
// %n: require newline
// %t: require tab
// %r/p: require AM | PM
// %R: require hours:minutes (ex: 13:57)
// %S: require seconds
// %T: require hours:minutes:seconds (ex: 13:57:34)
// %w: require week day number
// %y: require 2 digits year (69 < year < 99: in the 1900 else in 2000)
// %Y: require full year
// %z: require timezone hours:minutes or single number to represent hour and minutes
// %x: require single number to represent hour and minutes
// %X: require sub second precision
// %Z: require timezone name
// %+: ignore until next '%'
// %%: require character '%'
ErrorOr<String> to_string(StringView format = "%Y-%m-%d %H:%M:%S"sv, LocalTime = LocalTime::Yes) const;
ByteString to_byte_string(StringView format = "%Y-%m-%d %H:%M:%S"sv, LocalTime = LocalTime::Yes) const;
static DateTime create(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
static DateTime now();
static DateTime from_timestamp(time_t);