Instant.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
  3. * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
  4. * Copyright (c) 2024, Tim Flynn <trflynn89@ladybird.org>
  5. *
  6. * SPDX-License-Identifier: BSD-2-Clause
  7. */
  8. #pragma once
  9. #include <LibCrypto/BigInt/SignedBigInteger.h>
  10. #include <LibCrypto/BigInt/UnsignedBigInteger.h>
  11. namespace JS::Temporal {
  12. // https://tc39.es/proposal-temporal/#eqn-nsMaxInstant
  13. extern Crypto::SignedBigInteger const NANOSECONDS_MAX_INSTANT;
  14. // https://tc39.es/proposal-temporal/#eqn-nsMinInstant
  15. extern Crypto::SignedBigInteger const NANOSECONDS_MIN_INSTANT;
  16. // https://tc39.es/proposal-temporal/#eqn-nsPerDay
  17. extern Crypto::UnsignedBigInteger const NANOSECONDS_PER_DAY;
  18. // Non-standard:
  19. extern Crypto::UnsignedBigInteger const NANOSECONDS_PER_HOUR;
  20. extern Crypto::UnsignedBigInteger const NANOSECONDS_PER_MINUTE;
  21. extern Crypto::UnsignedBigInteger const NANOSECONDS_PER_SECOND;
  22. extern Crypto::UnsignedBigInteger const NANOSECONDS_PER_MILLISECOND;
  23. extern Crypto::UnsignedBigInteger const NANOSECONDS_PER_MICROSECOND;
  24. extern Crypto::UnsignedBigInteger const NANOSECONDS_PER_NANOSECOND;
  25. extern Crypto::UnsignedBigInteger const MICROSECONDS_PER_MILLISECOND;
  26. extern Crypto::UnsignedBigInteger const MILLISECONDS_PER_SECOND;
  27. extern Crypto::UnsignedBigInteger const SECONDS_PER_MINUTE;
  28. extern Crypto::UnsignedBigInteger const MINUTES_PER_HOUR;
  29. extern Crypto::UnsignedBigInteger const HOURS_PER_DAY;
  30. }