Record Class ISODateTimeRecord
java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.builtins.temporal.ISODateTimeRecord
- Record Components:
year- The year in the ISO 8601 calendar. An integer.month- The number of the month. An integer between 1 and 12, inclusive.day- The number of the day of the month. An integer between 1 and 31, inclusive.hour- The number of the hour. An integer in the inclusive range 0 to 23.minute- The number of the minute. An integer in the inclusive range 0 to 59.second- The number of the second. An integer in the inclusive range 0 to 59.millisecond- The number of the millisecond. An integer in the inclusive range 0 to 999.microsecond- The number of the microsecond. An integer in the inclusive range 0 to 999.nanosecond- The number of the nanosecond. An integer in the inclusive range 0 to 999.
public record ISODateTimeRecord(int year, int month, int day, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond)
extends Record
An ISO Date-Time Record is used to represent a valid calendar date in the ISO 8601 calendar
together with a clock time.
-
Constructor Summary
ConstructorsConstructorDescriptionISODateTimeRecord(int year, int month, int day, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond) Creates an instance of aISODateTimeRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintday()Returns the value of thedayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inthour()Returns the value of thehourrecord component.intReturns the value of themicrosecondrecord component.intReturns the value of themillisecondrecord component.intminute()Returns the value of theminuterecord component.intmonth()Returns the value of themonthrecord component.intReturns the value of thenanosecondrecord component.intsecond()Returns the value of thesecondrecord component.final StringtoString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.
-
Constructor Details
-
ISODateTimeRecord
public ISODateTimeRecord(int year, int month, int day, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond) Creates an instance of aISODateTimeRecordrecord class.- Parameters:
year- the value for theyearrecord componentmonth- the value for themonthrecord componentday- the value for thedayrecord componenthour- the value for thehourrecord componentminute- the value for theminuterecord componentsecond- the value for thesecondrecord componentmillisecond- the value for themillisecondrecord componentmicrosecond- the value for themicrosecondrecord componentnanosecond- the value for thenanosecondrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
year
-
month
-
day
-
hour
-
minute
-
second
-
millisecond
public int millisecond()Returns the value of themillisecondrecord component.- Returns:
- the value of the
millisecondrecord component
-
microsecond
public int microsecond()Returns the value of themicrosecondrecord component.- Returns:
- the value of the
microsecondrecord component
-
nanosecond
public int nanosecond()Returns the value of thenanosecondrecord component.- Returns:
- the value of the
nanosecondrecord component
-