trait Date extends scala.scalajs.js.Object with StObject
Enables basic storage and retrieval of dates and times.
- Annotations
- @JSType() @native()
- Source
- Date.scala
- Alphabetic
- By Inheritance
- Date
- StObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getDate(): Double
Gets the day-of-the-month, using local time.
- def getDay(): Double
Gets the day of the week, using local time.
- def getFullYear(): Double
Gets the year, using local time.
- def getHours(): Double
Gets the hours in a date, using local time.
- def getMilliseconds(): Double
Gets the milliseconds of a Date, using local time.
- def getMinutes(): Double
Gets the minutes of a Date object, using local time.
- def getMonth(): Double
Gets the month, using local time.
- def getSeconds(): Double
Gets the seconds of a Date object, using local time.
- def getTime(): Double
Gets the time value in milliseconds.
- def getTimezoneOffset(): Double
Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).
- def getUTCDate(): Double
Gets the day-of-the-month, using Universal Coordinated Time (UTC).
- def getUTCDay(): Double
Gets the day of the week using Universal Coordinated Time (UTC).
- def getUTCFullYear(): Double
Gets the year using Universal Coordinated Time (UTC).
- def getUTCHours(): Double
Gets the hours value in a Date object using Universal Coordinated Time (UTC).
- def getUTCMilliseconds(): Double
Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).
- def getUTCMinutes(): Double
Gets the minutes of a Date object using Universal Coordinated Time (UTC).
- def getUTCMonth(): Double
Gets the month of a Date object using Universal Coordinated Time (UTC).
- def getUTCSeconds(): Double
Gets the seconds of a Date object using Universal Coordinated Time (UTC).
- def hasOwnProperty(v: scala.Predef.String): scala.Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: scala.Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: scala.scalajs.js.Object): scala.Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def propertyIsEnumerable(v: scala.Predef.String): scala.Boolean
- Definition Classes
- Object
- def setDate(date: Double): Double
Sets the numeric day-of-the-month value of the Date object using local time.
Sets the numeric day-of-the-month value of the Date object using local time.
- date
A numeric value equal to the day of the month.
- def setFullYear(year: Double, month: Unit, date: Double): Double
- def setFullYear(year: Double, month: Double, date: Double): Double
- def setFullYear(year: Double, month: Double): Double
- def setFullYear(year: Double): Double
Sets the year of the Date object using local time.
Sets the year of the Date object using local time.
- year
A numeric value for the year.
- def setHours(hours: Double, min: Unit, sec: Unit, ms: Double): Double
- def setHours(hours: Double, min: Unit, sec: Double, ms: Double): Double
- def setHours(hours: Double, min: Unit, sec: Double): Double
- def setHours(hours: Double, min: Double, sec: Unit, ms: Double): Double
- def setHours(hours: Double, min: Double, sec: Double, ms: Double): Double
- def setHours(hours: Double, min: Double, sec: Double): Double
- def setHours(hours: Double, min: Double): Double
- def setHours(hours: Double): Double
Sets the hour value in the Date object using local time.
Sets the hour value in the Date object using local time.
- hours
A numeric value equal to the hours value.
- def setMilliseconds(ms: Double): Double
Sets the milliseconds value in the Date object using local time.
Sets the milliseconds value in the Date object using local time.
- ms
A numeric value equal to the millisecond value.
- def setMinutes(min: Double, sec: Unit, ms: Double): Double
- def setMinutes(min: Double, sec: Double, ms: Double): Double
- def setMinutes(min: Double, sec: Double): Double
- def setMinutes(min: Double): Double
Sets the minutes value in the Date object using local time.
Sets the minutes value in the Date object using local time.
- min
A numeric value equal to the minutes value.
- def setMonth(month: Double, date: Double): Double
- def setMonth(month: Double): Double
Sets the month value in the Date object using local time.
Sets the month value in the Date object using local time.
- month
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- def setSeconds(sec: Double, ms: Double): Double
- def setSeconds(sec: Double): Double
Sets the seconds value in the Date object using local time.
Sets the seconds value in the Date object using local time.
- sec
A numeric value equal to the seconds value.
- def setTime(time: Double): Double
Sets the date and time value in the Date object.
Sets the date and time value in the Date object.
- time
A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
- def setUTCDate(date: Double): Double
Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
- date
A numeric value equal to the day of the month.
- def setUTCFullYear(year: Double, month: Unit, date: Double): Double
- def setUTCFullYear(year: Double, month: Double, date: Double): Double
- def setUTCFullYear(year: Double, month: Double): Double
- def setUTCFullYear(year: Double): Double
Sets the year value in the Date object using Universal Coordinated Time (UTC).
Sets the year value in the Date object using Universal Coordinated Time (UTC).
- year
A numeric value equal to the year.
- def setUTCHours(hours: Double, min: Unit, sec: Unit, ms: Double): Double
- def setUTCHours(hours: Double, min: Unit, sec: Double, ms: Double): Double
- def setUTCHours(hours: Double, min: Unit, sec: Double): Double
- def setUTCHours(hours: Double, min: Double, sec: Unit, ms: Double): Double
- def setUTCHours(hours: Double, min: Double, sec: Double, ms: Double): Double
- def setUTCHours(hours: Double, min: Double, sec: Double): Double
- def setUTCHours(hours: Double, min: Double): Double
- def setUTCHours(hours: Double): Double
Sets the hours value in the Date object using Universal Coordinated Time (UTC).
Sets the hours value in the Date object using Universal Coordinated Time (UTC).
- hours
A numeric value equal to the hours value.
- def setUTCMilliseconds(ms: Double): Double
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
- ms
A numeric value equal to the millisecond value.
- def setUTCMinutes(min: Double, sec: Unit, ms: Double): Double
- def setUTCMinutes(min: Double, sec: Double, ms: Double): Double
- def setUTCMinutes(min: Double, sec: Double): Double
- def setUTCMinutes(min: Double): Double
Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
- min
A numeric value equal to the minutes value.
- def setUTCMonth(month: Double, date: Double): Double
- def setUTCMonth(month: Double): Double
Sets the month value in the Date object using Universal Coordinated Time (UTC).
Sets the month value in the Date object using Universal Coordinated Time (UTC).
- month
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
- def setUTCSeconds(sec: Double, ms: Double): Double
- def setUTCSeconds(sec: Double): Double
Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
- sec
A numeric value equal to the seconds value.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toDateString(): java.lang.String
Returns a date as a string value.
- def toISOString(): java.lang.String
Returns a date as a string value in ISO format.
- def toJSON(key: Any): java.lang.String
- def toJSON(): java.lang.String
Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.
- def toLocaleDateString(locales: Unit, options: DateTimeFormatOptions): java.lang.String
- def toLocaleDateString(locales: scala.scalajs.js.Array[java.lang.String], options: DateTimeFormatOptions): java.lang.String
- def toLocaleDateString(locales: scala.scalajs.js.Array[java.lang.String]): java.lang.String
- def toLocaleDateString(locales: java.lang.String, options: DateTimeFormatOptions): java.lang.String
- def toLocaleDateString(locales: java.lang.String): java.lang.String
- def toLocaleDateString(): java.lang.String
Returns a date as a string value appropriate to the host environment's current locale.
- def toLocaleString(locales: Unit, options: DateTimeFormatOptions): java.lang.String
- def toLocaleString(locales: scala.scalajs.js.Array[java.lang.String], options: DateTimeFormatOptions): java.lang.String
- def toLocaleString(locales: scala.scalajs.js.Array[java.lang.String]): java.lang.String
- def toLocaleString(locales: java.lang.String, options: DateTimeFormatOptions): java.lang.String
- def toLocaleString(locales: java.lang.String): java.lang.String
- def toLocaleString(): scala.Predef.String
- Definition Classes
- Object
- def toLocaleTimeString(locales: Unit, options: DateTimeFormatOptions): java.lang.String
- def toLocaleTimeString(locales: scala.scalajs.js.Array[java.lang.String], options: DateTimeFormatOptions): java.lang.String
- def toLocaleTimeString(locales: scala.scalajs.js.Array[java.lang.String]): java.lang.String
- def toLocaleTimeString(locales: java.lang.String, options: DateTimeFormatOptions): java.lang.String
- def toLocaleTimeString(locales: java.lang.String): java.lang.String
- def toLocaleTimeString(): java.lang.String
Returns a time as a string value appropriate to the host environment's current locale.
- val toPrimitive: Function1[default, java.lang.String] with Function1[string, java.lang.String] with Function1[number, Double] with Function1[java.lang.String, |[java.lang.String, Double]]
Converts a Date object to a string or number.
Converts a Date object to a string or number.
- Annotations
- @JSName(js.Symbol.toPrimitive)
- Exceptions thrown
{TypeError}If 'hint' was given something other than "number", "string", or "default".
- def toString(): java.lang.String
- Definition Classes
- AnyRef → Any
- def toTimeString(): java.lang.String
Returns a time as a string value.
- def toUTCString(): java.lang.String
Returns a date converted to a string using Universal Coordinated Time (UTC).
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated