File indexing completed on 2026-09-18 09:18:28
0001
0002
0003
0004
0005 #ifndef INCLUDE_V8_DATE_H_
0006 #define INCLUDE_V8_DATE_H_
0007
0008 #include "v8-local-handle.h" // NOLINT(build/include_directory)
0009 #include "v8-object.h" // NOLINT(build/include_directory)
0010 #include "v8config.h" // NOLINT(build/include_directory)
0011
0012 namespace v8 {
0013
0014 class Context;
0015
0016
0017
0018
0019 class V8_EXPORT Date : public Object {
0020 public:
0021 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context,
0022 double time);
0023
0024 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> Parse(
0025 Local<Context> context,
0026 Local<String> date_string);
0027
0028
0029
0030
0031
0032 double ValueOf() const;
0033
0034
0035
0036
0037 v8::Local<v8::String> ToISOString() const;
0038
0039
0040
0041
0042 v8::Local<v8::String> ToUTCString() const;
0043
0044 V8_INLINE static Date* Cast(Value* value) {
0045 #ifdef V8_ENABLE_CHECKS
0046 CheckCast(value);
0047 #endif
0048 return static_cast<Date*>(value);
0049 }
0050
0051 private:
0052 static void CheckCast(Value* obj);
0053 };
0054
0055 }
0056
0057 #endif