| Package | Description | 
|---|---|
| java.util | Contains the collections framework, legacy collection classes, event model,
date and time facilities, internationalization, and miscellaneous utility
classes (a string tokenizer, a random-number generator, and a bit array). | 
| javax.xml.datatype | XML/Java Type Mappings. | 
| Modifier and Type | Method and Description | 
|---|---|
| static GregorianCalendar | GregorianCalendar. from(ZonedDateTime zdt)Obtains an instance of  GregorianCalendarwith the default locale
 from aZonedDateTimeobject. | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract GregorianCalendar | XMLGregorianCalendar. toGregorianCalendar()Convert this  XMLGregorianCalendarto aGregorianCalendar. | 
| abstract GregorianCalendar | XMLGregorianCalendar. toGregorianCalendar(TimeZone timezone,
                   Locale aLocale,
                   XMLGregorianCalendar defaults)Convert this  XMLGregorianCalendaralong with provided parameters
 to aGregorianCalendarinstance. | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract XMLGregorianCalendar | DatatypeFactory. newXMLGregorianCalendar(GregorianCalendar cal)Create an  XMLGregorianCalendarfrom aGregorianCalendar. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.