ThaiBuddhistDate atTime() method in Java with Example Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The atTime() method of java.time.chrono.ThaiBuddhistDate class is used to get the ThaiBuddhist date and time according to ThaiBuddhist calendar system from another TemporalAccessor object. Syntax: public ChronoLocalDateTime atTime(LocalTime localTime) Parameter: This method takes the object of type LocalTime as a parameter. Return Value: This method returns the ChronoLocalDateTime by adding up this ThaiBuddhist date with the passed local time. A ChronoLocalDateTime is a date-time which doesn't have a time-zone in some arbitrary chronology. It is intended for advanced globalization use cases. Below are the examples to illustrate the atTime() method: Example 1: Java // Java program to demonstrate // atTime() method import java.util.*; import java.io.*; import java.time.*; import java.time.chrono.*; public class GFG { public static void main(String[] argv) { try { // Creating and initializing // ThaiBuddhistDate Object ThaiBuddhistDate hidate = ThaiBuddhistDate.now(); // Creating and initializing // TemporalAccessor object LocalTime localtime = LocalTime.now(); // Getting the Chrono Local date // time by using atTime() method ChronoLocalDateTime<ThaiBuddhistDate> date = hidate.atTime(localtime); // Display the result System.out.println( "Chrono LocalDateTime is: " + date); } catch (DateTimeException e) { System.out.println( "Passed parameter can" + " not form a date"); System.out.println( "Exception thrown: " + e); } } } Output: Chrono LocalDateTime is: ThaiBuddhist BE 2563-05-03T13:16:55.338 Example 2: Java // Java program to demonstrate // atTime() method import java.util.*; import java.io.*; import java.time.*; import java.time.chrono.*; public class GFG { public static void main(String[] argv) { try { // Creating and initializing // ThaiBuddhistDate Object ThaiBuddhistDate hidate = ThaiBuddhistDate.now(); // Creating and initializing // TemporalAccessor object LocalTime localtime = LocalTime.of(8, 20); // Getting the Chrono Local date // time by using atTime() method ChronoLocalDateTime<ThaiBuddhistDate> date = hidate.atTime(localtime); // Display the result System.out.println( "Chrono LocalDateTime is: " + date); } catch (DateTimeException e) { System.out.println( "Passed parameter can" + " not form a date"); System.out.println( "Exception thrown: " + e); } } } Output: Chrono LocalDateTime is: ThaiBuddhist BE 2563-05-03T08:20 Reference: https://docs.oracle.com/javase/9/docs/api/java/time/chrono/ThaiBuddhistDate.html#atTime-java.time.LocalTime- Comment More infoAdvertise with us Next Article ThaiBuddhistDate getEra() method in Java with Example R rohitprasad3 Follow Improve Article Tags : Java Java-Functions Java-Time-Chrono package Practice Tags : Java Similar Reads ThaiBuddhistDate of() method in Java with Example The of() method of java.time.chrono.ThaiBuddhistDate class is used to generate the date according to ThaiBuddhist calendar system by using the passed proleptic year, month and date. Syntax: public static ThaiBuddhistDate of(int Year, int month, int dayOfMonth) Parameter: This method takes the follow 2 min read ThaiBuddhistDate from() method in Java with Example The from() method of java.time.chrono.ThaiBuddhistDate class is used to get the ThaiBuddhist date according to the ThaiBuddhist calendar system for the particular temporal object. Syntax: public static ThaiBuddhistDate from(TemporalAccessor temporal) Parameter: This method takes the object of any te 2 min read ThaiBuddhistDate now(Clock) method in Java with Example The now() method of java.time.chrono.ThaiBuddhistDate class is used to get the current ThaiBuddhist date according to the ThaiBuddhist calendar system from the specified clock. Syntax: public static ThaiBuddhistDate now(Clock clock) Parameter: This method takes the object of the clock on the basis o 2 min read ThaiBuddhistDate getEra() method in Java with Example The getEra() method of java.time.chrono.ThaiBuddhistDate class is used to retrieve the era related to this ThaiBuddhist date. Syntax: public ThaiBuddhistEra getEra() Parameter: This method does not accept any parameter. Return Value: This method returns the era of this ThaiBuddhist date. Below are t 2 min read MinguoDate atTime() method in Java with Example The atTime() method of java.time.chrono.MinguoDate class is used to add up this MinguoDate time with a local time for producing an equivalent date and time. Syntax: public final ChronoLocalDateTime atTime(LocalTime localTime) Parameter: This method takes the object of type LocalTime as a parameter. 2 min read ThaiBuddhistDate getLong() method in Java with Example The getLong() method of java.time.chrono.ThaiBuddhistDate class is used to retrieve the passed temporal field in long format. Syntax: public long getLong(TemporalField field) Parameter: This method takes any type of temporal field as a parameter. Return Value: This method returns the passed temporal 2 min read Like