Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Write a description of class ClockDisplay here.
- *
- * @author Ahmad Lamaul Farid
- * @version 21 Oktober 2020
- */
- /**
- * function to call current date.
- */
- import java.time.format.DateTimeFormatter;
- /**
- * function to call local time.
- */
- import java.time.LocalDateTime;
- public class ClockDisplay
- {
- public static void main(String[] args)
- {
- LocalDateTime now = LocalDateTime.now();
- System.out.println("======= Jadwal Waktu Sholat =======");
- System.out.println("Date : ");
- DateTimeFormatter dateNow = DateTimeFormatter.ofPattern("dd/MM/yyyy");
- System.out.println(dateNow.format(now));
- System.out.println("Time : ");
- DateTimeFormatter timeNow = DateTimeFormatter.ofPattern("HH:mm:ss");
- System.out.println(timeNow.format(now));
- PrayerTime time = new PrayerTime();
- System.out.println ("Imsak :" + time.getImsak());
- System.out.println ("Shubuh :" + time.getShubuh());
- System.out.println ("Terbit :" + time.getTerbit());
- System.out.println ("Dhuha :" + time.getDhuha());
- System.out.println ("Dhuhur :" + time.getDhuhur());
- System.out.println ("Ashar :" + time.getAshar());
- System.out.println ("Maghrib :" + time.getMaghrib());
- System.out.println ("Isya' :" + time.getIsya());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement