HOW-TO: Use the Calendar class in Java

Tuesday, February 24th, 2009

Sometimes a program needs to know something about a date, like what day of the week it occured. Maybe you want to do something like know which months have 31 days in them. All of this can be done with the Calendar class in the java.util package. First we need to import the package: import […]