| Modifier and Type | Field and Description |
|---|---|
static CalendarUtils |
INSTANCE
The singleton instance for
Calendar.getInstance(). |
| Constructor and Description |
|---|
CalendarUtils(Calendar calendar)
Creates an instance for the given Calendar.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDayOfMonth()
Gets the current day of month.
|
int |
getDayOfYear()
Gets the current day of year.
|
static CalendarUtils |
getInstance()
Creates a new instance based on the current time in the default time zone with the default
Locale.Category.FORMAT locale. |
int |
getMonth()
Gets the current month.
|
int |
getYear()
Gets the current year.
|
public static final CalendarUtils INSTANCE
Calendar.getInstance(). The instance is created when the class is initialized and is based on the current time in the
default time zone with the default Locale.Category.FORMAT locale.getInstance()public CalendarUtils(Calendar calendar)
calendar - A Calendar.public static CalendarUtils getInstance()
Locale.Category.FORMAT locale.public int getDayOfMonth()
public int getDayOfYear()
public int getMonth()
public int getYear()
Copyright © 2001–2024 The Apache Software Foundation. All rights reserved.