Udemy: Java Programming(Date & Time): basics for beginners

Kids Hide Away >> Developer Blog >> Udemy: Java Programming(Date & Time): basics for beginners

Link to Class: https://www.udemy.com/java-datetime/

Update: 3/18/2019
Section 1
Lecture 1: Introduction
Section 2
Lecture 3:  display current month, date, and time
Lecture 4: learn how to format hour, seconds, months and display them
Lecture 5:  display weekdays, show time in different language, add time to current …
Lecture 6: roll method in calendar, display different date formats
Lecture 7: roll method in calendar, display different date formats

I wrote down all the examples, don’t match up with the tutorial, or Java documentation. 
The only place I had any issues was the DAY_Of_MONTH type format which even on the tutorial sites does not work as stated.  I seem to recall, that there was an extra step to get the right numbers but I don’t see any examples of it.

Date d = new Date();
Calendar c1 = Calendar.getInstance();
c1.setTime(d); 

System.out.println(" " + c1.DAY_OF_MONTH + " Field number ... indicating the day of the month.");System.out.println(" " + c1.DAY_OF_WEEK + " Field number ... indicating the day of the week.");

System.out.println(" " + c1.DAY_OF_WEEK_IN_MONTH + " Field number ... indicating the ordinal number of the day of the week within the current month.");

System.out.println(" " + c1.DAY_OF_YEAR + " Field number ... indicating the day number within the current year."); 

System.out.println(" " + c1.WEEK_OF_MONTH + " Field number ... indicating the week number within the current month."); 

System.out.println(" " + c1.WEEK_OF_YEAR + " Field number ... indicating the week number within the current year."); System.out.println(" " + c1.YEAR + " Field number ... indicating the year."); 

Developer Blog - Before 2020

Udemy: Java Programming for Complete Beginners – Learn in 250 Steps Day 26: 2/04/2019 (Monday) (100 Days of Code)

Related Post

Vlogmas Day 25

https://youtu.be/AI-Idoxf9aE 🐉 Dev Log - Debugging Level Designs Black Cat Adventures is a 2d casual…

Dev Log – 1/18/2020

https://youtu.be/D1JIz7WXttg

Hat Trick Developer Blog 9/25/2025

Date: Thursday 9/25/2025Total Time Blocks: 4Total Hours: 2 📋 Task 1: Code for 2 hours…
PurpleDragonDev is Live on Twitch PurpleDragonDev is Offline.