|
|
@@ -102,6 +102,10 @@ public class NumFormat {
|
|
|
return 0.0;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 前半年开始时间
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static java.sql.Date getsixM() {
|
|
|
Calendar ca = Calendar.getInstance();
|
|
|
ca.setTime(getDayStartMon());
|
|
|
@@ -109,6 +113,10 @@ public class NumFormat {
|
|
|
return new java.sql.Date(ca.getTime().getTime());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 前四个月开始时间, xxx月1号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static java.sql.Date getThreeM() {
|
|
|
Calendar ca = Calendar.getInstance();
|
|
|
ca.setTime(getDayStartMon());
|
|
|
@@ -116,6 +124,10 @@ public class NumFormat {
|
|
|
return new java.sql.Date(ca.getTime().getTime());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 前三个月开始时间, xxx月1号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static java.sql.Date getTwoM() {
|
|
|
Calendar ca = Calendar.getInstance();
|
|
|
ca.setTime(getDayStartMon());
|
|
|
@@ -123,6 +135,10 @@ public class NumFormat {
|
|
|
return new java.sql.Date(ca.getTime().getTime());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 前两个月开始时间, xxx月1号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static java.sql.Date getOneM() {
|
|
|
Calendar ca = Calendar.getInstance();
|
|
|
ca.setTime(getDayStartMon());
|
|
|
@@ -130,6 +146,10 @@ public class NumFormat {
|
|
|
return new java.sql.Date(ca.getTime().getTime());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 上月开始时间
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static java.sql.Date getThisM() {
|
|
|
Calendar ca = Calendar.getInstance();
|
|
|
ca.setTime(getDayStartMon());
|
|
|
@@ -137,11 +157,19 @@ public class NumFormat {
|
|
|
return new java.sql.Date(ca.getTime().getTime());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 本月开始时间
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static java.sql.Date getNowM() {
|
|
|
return new java.sql.Date(getDayStartMon().getTime());
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 本年开始时间,xxxx年1月1号 00:00:00
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static Date getDayStartYear() {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.set(Calendar.MONTH, 0);
|
|
|
@@ -153,6 +181,10 @@ public class NumFormat {
|
|
|
return calendar.getTime();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 本月开始时间,xxxx年年xx月1号 00:00:00
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static Date getDayStartMon() {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.set(Calendar.DATE, 1);
|