scala.scalajs.js

Date

class Date extends Object

Creates a JavaScript Date instance that represents a single moment in time. Date objects are based on a time value that is the number of milliseconds since 1 January, 1970 UTC.

MDN

Annotations
@RawJSType() @native() @JSGlobal()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Date
  2. Object
  3. Any
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Date(year: Int, month: Int, date: Int = 1, hours: Int = 0, minutes: Int = 0, seconds: Int = 0, ms: Int = 0)

  2. new Date(value: String)

  3. new Date(value: Double)

  4. new Date()

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: scala.Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Date to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Date, B)

    Implicit information
    This member is added by an implicit conversion from Date to ArrowAssoc[Date] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: scala.Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensuring(cond: (Date) ⇒ Boolean, msg: ⇒ scala.Any): Date

    Implicit information
    This member is added by an implicit conversion from Date to Ensuring[Date] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (Date) ⇒ Boolean): Date

    Implicit information
    This member is added by an implicit conversion from Date to Ensuring[Date] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ scala.Any): Date

    Implicit information
    This member is added by an implicit conversion from Date to Ensuring[Date] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): Date

    Implicit information
    This member is added by an implicit conversion from Date to Ensuring[Date] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: scala.Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Date to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def getDate(): Int

    Returns the day of the month (1-31) for the specified date according to local time.

    Returns the day of the month (1-31) for the specified date according to local time.

    MDN

  20. def getDay(): Int

    Returns the day of the week (0-6) for the specified date according to local time.

    Returns the day of the week (0-6) for the specified date according to local time.

    MDN

  21. def getFullYear(): Int

    Returns the year (4 digits for 4-digit years) of the specified date according to local time.

    Returns the year (4 digits for 4-digit years) of the specified date according to local time.

    MDN

  22. def getHours(): Int

    Returns the hour (0-23) in the specified date according to local time.

    Returns the hour (0-23) in the specified date according to local time.

    MDN

  23. def getMilliseconds(): Int

    Returns the milliseconds (0-999) in the specified date according to local time.

    Returns the milliseconds (0-999) in the specified date according to local time.

    MDN

  24. def getMinutes(): Int

    Returns the minutes (0-59) in the specified date according to local time.

    Returns the minutes (0-59) in the specified date according to local time.

    MDN

  25. def getMonth(): Int

    Returns the month (0-11) in the specified date according to local time.

    Returns the month (0-11) in the specified date according to local time.

    MDN

  26. def getSeconds(): Int

    Returns the seconds (0-59) in the specified date according to local time.

    Returns the seconds (0-59) in the specified date according to local time.

    MDN

  27. def getTime(): Double

  28. def getTimezoneOffset(): Int

    Returns the time-zone offset in minutes for the current locale.

    Returns the time-zone offset in minutes for the current locale.

    MDN

  29. def getUTCDate(): Int

    Returns the day (date) of the month (1-31) in the specified date according to universal time.

    Returns the day (date) of the month (1-31) in the specified date according to universal time.

    MDN

  30. def getUTCDay(): Int

    Returns the day of the week (0-6) in the specified date according to universal time.

    Returns the day of the week (0-6) in the specified date according to universal time. MDN

  31. def getUTCFullYear(): Int

    Returns the year (4 digits for 4-digit years) in the specified date according to universal time.

    Returns the year (4 digits for 4-digit years) in the specified date according to universal time.

    MDN

  32. def getUTCHours(): Int

    Returns the hours (0-23) in the specified date according to universal time.

    Returns the hours (0-23) in the specified date according to universal time.

    MDN

  33. def getUTCMilliseconds(): Int

    Returns the milliseconds (0-999) in the specified date according to universal time.

    Returns the milliseconds (0-999) in the specified date according to universal time.

    MDN

  34. def getUTCMinutes(): Int

    Returns the minutes (0-59) in the specified date according to universal time.

    Returns the minutes (0-59) in the specified date according to universal time.

    MDN

  35. def getUTCMonth(): Int

    Returns the month (0-11) in the specified date according to universal time.

    Returns the month (0-11) in the specified date according to universal time.

    MDN

  36. def getUTCSeconds(): Int

    Returns the seconds (0-59) in the specified date according to universal time.

    Returns the seconds (0-59) in the specified date according to universal time.

    MDN

  37. def hasOwnProperty(v: String): Boolean

    Tests whether this object has the specified property as a direct property.

    Tests whether this object has the specified property as a direct property.

    Unlike js.Object.hasProperty, this method does not check down the object's prototype chain.

    MDN

    Definition Classes
    Object
  38. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  39. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  40. def isPrototypeOf(v: Object): Boolean

    Tests whether this object is in the prototype chain of another object.

    Tests whether this object is in the prototype chain of another object.

    Definition Classes
    Object
  41. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  42. final def notify(): Unit

    Definition Classes
    AnyRef
  43. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  44. def propertyIsEnumerable(v: String): Boolean

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain.

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain. If the object does not have the specified property, this method returns false.

    MDN

    Definition Classes
    Object
  45. def setDate(date: Int): Unit

  46. def setFullYear(year: Int, month: Int = getMonth(), date: Int = getDate()): Unit

  47. def setHours(hours: Int, min: Int = getMinutes(), sec: Int = getSeconds(), ms: Int = getMilliseconds()): Unit

  48. def setMilliseconds(ms: Int): Unit

  49. def setMinutes(min: Int, sec: Int = getSeconds(), ms: Int = getMilliseconds()): Unit

  50. def setMonth(month: Int, date: Int = getDate()): Unit

  51. def setSeconds(sec: Int, ms: Int = getMilliseconds()): Unit

  52. def setTime(time: Double): Unit

  53. def setUTCDate(date: Int): Unit

  54. def setUTCFullYear(year: Int, month: Int = getMonth(), date: Int = getDate()): Unit

  55. def setUTCHours(hours: Int, min: Int = getMinutes(), sec: Int = getSeconds(), ms: Int = getMilliseconds()): Unit

  56. def setUTCMilliseconds(ms: Int): Unit

  57. def setUTCMinutes(min: Int, sec: Int = getSeconds(), ms: Int = getMilliseconds()): Unit

  58. def setUTCMonth(month: Int, date: Int = getDate()): Unit

  59. def setUTCSeconds(sec: Int, ms: Int = getMilliseconds()): Unit

  60. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  61. def toDateString(): String

  62. def toISOString(): String

  63. def toJSON(): String

  64. def toJSON(key: Any): String

  65. def toLocaleDateString(): String

  66. def toLocaleString(): String

    Definition Classes
    Object
  67. def toLocaleTimeString(): String

  68. def toString(): String

    Definition Classes
    AnyRef → Any
  69. def toTimeString(): String

  70. def toUTCString(): String

  71. def valueOf(): Double

    Definition Classes
    DateObject
  72. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  73. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  74. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. def [B](y: B): (Date, B)

    Implicit information
    This member is added by an implicit conversion from Date to ArrowAssoc[Date] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: scala.Any

    Implicit information
    This member is added by an implicit conversion from Date to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (date: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: scala.Any

    Implicit information
    This member is added by an implicit conversion from Date to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (date: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Date

    Implicit information
    This member is added by an implicit conversion from Date to ArrowAssoc[Date] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (date: ArrowAssoc[Date]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Date

    Implicit information
    This member is added by an implicit conversion from Date to Ensuring[Date] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (date: Ensuring[Date]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from scala.Any

Inherited by implicit conversion any2stringadd from Date to StringAdd

Inherited by implicit conversion any2stringfmt from Date to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Date to ArrowAssoc[Date]

Inherited by implicit conversion any2Ensuring from Date to Ensuring[Date]

Ungrouped