mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix comment
This commit is contained in:
parent
da18d16c89
commit
e69965a707
@ -1214,6 +1214,7 @@ public class DateUtil {
|
|||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
public static Calendar beginOfQuarter(Calendar calendar) {
|
public static Calendar beginOfQuarter(Calendar calendar) {
|
||||||
|
//noinspection MagicConstant
|
||||||
calendar.set(Calendar.MONTH, calendar.get(DateField.MONTH.getValue()) / 3 * 3);
|
calendar.set(Calendar.MONTH, calendar.get(DateField.MONTH.getValue()) / 3 * 3);
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
return beginOfDay(calendar);
|
return beginOfDay(calendar);
|
||||||
@ -1227,6 +1228,7 @@ public class DateUtil {
|
|||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
public static Calendar endOfQuarter(Calendar calendar) {
|
public static Calendar endOfQuarter(Calendar calendar) {
|
||||||
|
//noinspection MagicConstant
|
||||||
calendar.set(Calendar.MONTH, calendar.get(DateField.MONTH.getValue()) / 3 * 3 + 2);
|
calendar.set(Calendar.MONTH, calendar.get(DateField.MONTH.getValue()) / 3 * 3 + 2);
|
||||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
return endOfDay(calendar);
|
return endOfDay(calendar);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user