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()
Linear Supertypes
Object, Any, AnyRef, scala.Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Date
  2. Object
  3. Any
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  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: scala.Any): scala.Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

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

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

    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef → Any
  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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

  25. def getTime(): Double

  26. 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

  27. 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

  28. 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

  29. 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

  30. 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

  31. 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

  32. 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

  33. 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

  34. 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

  35. 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
  36. def hashCode(): Int

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

    Definition Classes
    Any
  38. 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
  39. final def ne(arg0: AnyRef): scala.Boolean

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

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

    Definition Classes
    AnyRef
  42. 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
  43. def setDate(date: Int): Unit

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

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

  46. def setMilliseconds(ms: Int): Unit

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

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

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

  50. def setTime(time: Double): Unit

  51. def setUTCDate(date: Int): Unit

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

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

  54. def setUTCMilliseconds(ms: Int): Unit

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

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

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

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

    Definition Classes
    AnyRef
  59. def toDateString(): String

  60. def toISOString(): String

  61. def toJSON(): String

  62. def toJSON(key: Any): String

  63. def toLocaleDateString(): String

  64. def toLocaleString(): String

    Definition Classes
    Object
  65. def toLocaleTimeString(): String

  66. def toString(): java.lang.String

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

  68. def toUTCString(): String

  69. def valueOf(): Double

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

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

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

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

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

Deprecated Value Members

  1. def unary_!(): Boolean

    Definition Classes
    Any
    Annotations
    @deprecated
    Deprecated

    (Since version 0.5.0)

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from scala.Any

Inherited by implicit conversion any2stringadd from Date to any2stringadd[Date]

Inherited by implicit conversion StringFormat from Date to StringFormat[Date]

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

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

Ungrouped