Class JSDateObject

All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject

public final class JSDateObject extends JSNonProxyObject
  • Constructor Details

    • JSDateObject

      protected JSDateObject(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, double value)
  • Method Details

    • getTimeMillis

      public double getTimeMillis()
    • setTimeMillis

      public void setTimeMillis(double value)
    • create

      public static JSDateObject create(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, double value)
    • getClassName

      public com.oracle.truffle.api.strings.TruffleString getClassName()
      Description copied from class: JSDynamicObject
      The [[Class]] internal property. For ES5, this is the second part of what Object.prototype.toString.call(myObj) returns, e.g. "[object Array]".
      Overrides:
      getClassName in class JSNonProxyObject
    • getBuiltinToStringTag

      public com.oracle.truffle.api.strings.TruffleString getBuiltinToStringTag()
      Description copied from class: JSObject
      Returns builtinTag as per Object.prototype.toString(). By default returns "Object".
      Overrides:
      getBuiltinToStringTag in class JSObject
      Returns:
      built-in toStringTag
    • isDate

      protected boolean isDate()
    • asDate

      public LocalDate asDate(com.oracle.truffle.api.interop.InteropLibrary self) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • asTime

      public LocalTime asTime(com.oracle.truffle.api.interop.InteropLibrary self) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • asTimeZone

      public ZoneId asTimeZone(com.oracle.truffle.api.interop.InteropLibrary self) throws com.oracle.truffle.api.interop.UnsupportedMessageException
      Throws:
      com.oracle.truffle.api.interop.UnsupportedMessageException
    • toDisplayStringImpl

      public com.oracle.truffle.api.strings.TruffleString toDisplayStringImpl(boolean allowSideEffects, ToDisplayStringFormat format, int depth)
      Description copied from class: JSDynamicObject
      A more informative toString variant, mainly used for error messages.
      Overrides:
      toDisplayStringImpl in class JSNonProxyObject
      Parameters:
      format - formatting parameters
      depth - current nesting depth