Uses of Class
java.util.Date
Packages that useDate Package Description java.security Provides the classes and interfaces for the security framework.java.security.cert Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths.java.sql Provides the API for accessing and processing data stored in adata source (usually a relational database) using theJava™ programming language.java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.java.util Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.java.util.concurrent.locks Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.javax.management.openmbean Provides the open data types and Open MBean descriptor classes.javax.management.timer Provides the definition of the Timer MBean.javax.print.attribute Provides classes and interfaces that describe the types of Java™ Print Service attributes and how they can be collected into attribute sets.javax.print.attribute.standard Packagejavax.print.attribute.standardcontains classes for specific printing attributes.javax.security.auth.kerberos This package contains utility classes related to the Kerberos network authentication protocol.javax.security.cert Provides classes for public key certificates.javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.javax.xml.datatype Defines XML/Java Type Mappings.Uses ofDate injava.security
Methods injava.security that returnDate Modifier and Type Method Description abstractDateKeyStoreSpi. engineGetCreationDate(String alias)Returns the creation date of the entry identified by the given alias.DateKeyStore. getCreationDate(String alias)Returns the creation date of the entry identified by the given alias.DateTimestamp. getTimestamp()Returns the date and time when the timestamp was generated.Constructors injava.security with parameters of typeDate Constructor Description Timestamp(Date timestamp,CertPath signerCertPath)Constructs a Timestamp.Uses ofDate injava.security.cert
Methods injava.security.cert that returnDate Modifier and Type Method Description DateX509CertSelector. getCertificateValid()Returns the certificateValid criterion.DatePKIXParameters. getDate()Returns the time for which the validity of the certification path should be determined.DateX509CRLSelector. getDateAndTime()Returns the dateAndTime criterion.DateCertificateRevokedException. getInvalidityDate()Returns the invalidity date, as specified in the Invalidity Date extension of thisCertificateRevokedException.abstractDateX509CRL. getNextUpdate()Gets thenextUpdatedate from the CRL.abstractDateX509Certificate. getNotAfter()Gets thenotAfterdate from the validity period of the certificate.abstractDateX509Certificate. getNotBefore()Gets thenotBeforedate from the validity period of the certificate.DateX509CertSelector. getPrivateKeyValid()Returns the privateKeyValid criterion.DateCertificateRevokedException. getRevocationDate()Returns the date on which the certificate was revoked.abstractDateX509CRLEntry. getRevocationDate()Gets the revocation date from this X509CRLEntry, therevocationDate.abstractDateX509CRL. getThisUpdate()Gets thethisUpdatedate from the CRL.Methods injava.security.cert with parameters of typeDate Modifier and Type Method Description abstract voidX509Certificate. checkValidity(Date date)Checks that the given date is within the certificate's validity period.voidX509CertSelector. setCertificateValid(Date certValid)Sets the certificateValid criterion.voidPKIXParameters. setDate(Date date)Sets the time for which the validity of the certification path should be determined.voidX509CRLSelector. setDateAndTime(Date dateAndTime)Sets the dateAndTime criterion.voidX509CertSelector. setPrivateKeyValid(Date privateKeyValid)Sets the privateKeyValid criterion.Constructors injava.security.cert with parameters of typeDate Constructor Description CertificateRevokedException(Date revocationDate,CRLReason reason,X500Principal authority,Map<String,Extension> extensions)Constructs aCertificateRevokedExceptionwith the specified revocation date, reason code, authority name, and map of extensions.Uses ofDate injava.sql
Subclasses ofDate injava.sql Modifier and Type Class Description classDateA thin wrapper around a millisecond value that allows JDBC to identify this as an SQLDATEvalue.classTimeA thin wrapper around thejava.util.Dateclass that allows the JDBC API to identify this as an SQLTIMEvalue.classTimestampA thin wrapper aroundjava.util.Datethat allows the JDBC API to identify this as an SQLTIMESTAMPvalue.Methods injava.sql with parameters of typeDate Modifier and Type Method Description intTimestamp. compareTo(Date o)Compares thisTimestampobject to the givenDateobject.Uses ofDate injava.text
Methods injava.text that returnDate Modifier and Type Method Description DateSimpleDateFormat. get2DigitYearStart()Returns the beginning date of the 100-year period 2-digit years are interpreted as being within.DateDateFormat. parse(String source)Parses text from the beginning of the given string to produce a date.abstractDateDateFormat. parse(String source,ParsePosition pos)Parse a date/time string according to the given parse position.DateSimpleDateFormat. parse(String text,ParsePosition pos)Parses text from a string to produce aDate.Methods injava.text with parameters of typeDate Modifier and Type Method Description StringDateFormat. format(Date date)Formats aDateinto a date-time string.abstractStringBufferDateFormat. format(Date date,StringBuffer toAppendTo,FieldPosition fieldPosition)Formats aDateinto a date-time string.StringBufferSimpleDateFormat. format(Date date,StringBuffer toAppendTo,FieldPosition pos)Formats the givenDateinto a date/time string and appends the result to the givenStringBuffer.voidSimpleDateFormat. set2DigitYearStart(Date startDate)Sets the 100-year period 2-digit years will be interpreted as being in to begin on the date the user specifies.Uses ofDate injava.util
Methods injava.util that returnDate Modifier and Type Method Description staticDateDate. from(Instant instant)Obtains an instance ofDatefrom anInstantobject.DateGregorianCalendar. getGregorianChange()Gets the Gregorian Calendar change date.DateCalendar. getTime()Methods injava.util with parameters of typeDate Modifier and Type Method Description booleanDate. after(Date when)Tests if this date is after the specified date.booleanDate. before(Date when)Tests if this date is before the specified date.intDate. compareTo(Date anotherDate)Compares two Dates for ordering.booleanSimpleTimeZone. inDaylightTime(Date date)Queries if the given date is in daylight saving time.abstract booleanTimeZone. inDaylightTime(Date date)Queries if the givendateis in Daylight Saving Time in this time zone.voidTimer. schedule(TimerTask task,Date time)Schedules the specified task for execution at the specified time.voidTimer. schedule(TimerTask task,Date firstTime, long period)Schedules the specified task for repeatedfixed-delay execution, beginning at the specified time.voidTimer. scheduleAtFixedRate(TimerTask task,Date firstTime, long period)Schedules the specified task for repeatedfixed-rate execution, beginning at the specified time.voidGregorianCalendar. setGregorianChange(Date date)Sets theGregorianCalendarchange date.Calendar.BuilderCalendar.Builder. setInstant(Date instant)Sets the instant parameter to theinstantvalue given by aDate.voidCalendar. setTime(Date date)Sets this Calendar's time with the givenDate.Uses ofDate injava.util.concurrent.locks
Methods injava.util.concurrent.locks with parameters of typeDate Modifier and Type Method Description booleanAbstractQueuedLongSynchronizer.ConditionObject. awaitUntil(Date deadline)Implements absolute timed condition wait.booleanAbstractQueuedSynchronizer.ConditionObject. awaitUntil(Date deadline)Implements absolute timed condition wait.booleanCondition. awaitUntil(Date deadline)Causes the current thread to wait until it is signalled or interrupted, or the specified deadline elapses.Uses ofDate injavax.management.openmbean
Fields injavax.management.openmbean with type parameters of typeDate Modifier and Type Field Description staticSimpleType<Date>SimpleType. DATETheSimpleTypeinstance describing values whose Java class name isjava.util.Date.Uses ofDate injavax.management.timer
Methods injavax.management.timer that returnDate Modifier and Type Method Description DateTimer. getDate(Integer id)Gets a copy of the date associated to a timer notification.DateTimerMBean. getDate(Integer id)Gets a copy of the date associated to a timer notification.Methods injavax.management.timer with parameters of typeDate Modifier and Type Method Description IntegerTimer. addNotification(String type,String message,Object userData,Date date)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date and a null period and number of occurrences.IntegerTimer. addNotification(String type,String message,Object userData,Date date, long period)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date and period and a null number of occurrences.IntegerTimer. addNotification(String type,String message,Object userData,Date date, long period, long nbOccurences)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date, period and number of occurrences.IntegerTimer. addNotification(String type,String message,Object userData,Date date, long period, long nbOccurences, boolean fixedRate)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date, period and number of occurrences.IntegerTimerMBean. addNotification(String type,String message,Object userData,Date date)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date and a null period and number of occurrences.IntegerTimerMBean. addNotification(String type,String message,Object userData,Date date, long period)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date and period and a null number of occurrences.IntegerTimerMBean. addNotification(String type,String message,Object userData,Date date, long period, long nbOccurences)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date, period and number of occurrences.IntegerTimerMBean. addNotification(String type,String message,Object userData,Date date, long period, long nbOccurences, boolean fixedRate)Creates a new timer notification with the specifiedtype,messageanduserDataand inserts it into the list of notifications with a given date, period and number of occurrences.Uses ofDate injavax.print.attribute
Methods injavax.print.attribute that returnDate Modifier and Type Method Description DateDateTimeSyntax. getValue()Returns this date-time attribute'sjava.util.Datevalue.Constructors injavax.print.attribute with parameters of typeDate Constructor Description DateTimeSyntax(Date value)Construct a new date-time attribute with the givenjava.util.Datevalue.Uses ofDate injavax.print.attribute.standard
Constructors injavax.print.attribute.standard with parameters of typeDate Constructor Description DateTimeAtCompleted(Date dateTime)Construct a new date-time at completed attribute with the givenDatevalue.DateTimeAtCreation(Date dateTime)Construct a new date-time at creation attribute with the givenDatevalue.DateTimeAtProcessing(Date dateTime)Construct a new date-time at processing attribute with the givenDatevalue.JobHoldUntil(Date dateTime)Construct a new job hold until date-time attribute with the givenDatevalue.Uses ofDate injavax.security.auth.kerberos
Methods injavax.security.auth.kerberos that returnDate Modifier and Type Method Description DateKerberosTicket. getAuthTime()Returns the time that the client was authenticated.DateKerberosTicket. getEndTime()Returns the expiration time for this ticket's validity period.DateKerberosTicket. getRenewTill()Returns the latest expiration time for this ticket, including all renewals.DateKerberosTicket. getStartTime()Returns the start time for this ticket's validity period.Constructors injavax.security.auth.kerberos with parameters of typeDate Constructor Description KerberosTicket(byte[] asn1Encoding,KerberosPrincipal client,KerberosPrincipal server, byte[] sessionKey, int keyType, boolean[] flags,Date authTime,Date startTime,Date endTime,Date renewTill,InetAddress[] clientAddresses)Constructs aKerberosTicketusing credentials information that a client either receives from a KDC or reads from a cache.Uses ofDate injavax.security.cert
Methods injavax.security.cert that returnDate Modifier and Type Method Description abstractDateX509Certificate. getNotAfter()Deprecated.Gets thenotAfterdate from the validity period of the certificate.abstractDateX509Certificate. getNotBefore()Deprecated.Gets thenotBeforedate from the validity period of the certificate.Methods injavax.security.cert with parameters of typeDate Modifier and Type Method Description abstract voidX509Certificate. checkValidity(Date date)Deprecated.Checks that the specified date is within the certificate's validity period.Uses ofDate injavax.swing
Methods injavax.swing that returnDate Modifier and Type Method Description DateSpinnerDateModel. getDate()Returns the current element in this sequence ofDates.Methods injavax.swing that return types with arguments of typeDate Modifier and Type Method Description Comparable<Date>SpinnerDateModel. getEnd()Returns the lastDatein the sequence.Comparable<Date>SpinnerDateModel. getStart()Returns the firstDatein the sequence.Methods injavax.swing with parameters of typeDate Modifier and Type Method Description static <M,I>
RowFilter<M,I>RowFilter. dateFilter(RowFilter.ComparisonType type,Date date, int... indices)Returns aRowFilterthat includes entries that have at least oneDatevalue meeting the specified criteria.Method parameters injavax.swing with type arguments of typeDate Modifier and Type Method Description voidSpinnerDateModel. setEnd(Comparable<Date> end)Changes the upper limit forDates in this sequence.voidSpinnerDateModel. setStart(Comparable<Date> start)Changes the lower limit for Dates in this sequence.Constructors injavax.swing with parameters of typeDate Constructor Description SpinnerDateModel(Date value,Comparable<Date> start,Comparable<Date> end, int calendarField)Creates aSpinnerDateModelthat represents a sequence of dates betweenstartandend.Constructor parameters injavax.swing with type arguments of typeDate Constructor Description SpinnerDateModel(Date value,Comparable<Date> start,Comparable<Date> end, int calendarField)Creates aSpinnerDateModelthat represents a sequence of dates betweenstartandend.Uses ofDate injavax.xml.datatype
Methods injavax.xml.datatype with parameters of typeDate Modifier and Type Method Description voidDuration. addTo(Date date)Adds this duration to aDateobject.longDuration. getTimeInMillis(Date startInstant)Returns the length of the duration in milli-seconds.