質問編集履歴
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,12 +11,12 @@
|
|
11
11
|
public boolean getFlg() throws ParseException {
|
12
12
|
|
13
13
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
14
|
-
|
14
|
+
Date startDate = sdf.parse("2007-01-01");
|
15
|
-
|
15
|
+
Date endDate = sdf.parse("2017-05-26");
|
16
16
|
|
17
17
|
Date now = new Date();
|
18
|
-
int diff1 = now.compareTo(
|
18
|
+
int diff1 = now.compareTo(startDate);
|
19
|
-
int diff2 =
|
19
|
+
int diff2 = endDate.compareTo(now);
|
20
20
|
|
21
21
|
if (diff1 >= 0 && diff2 >= 0) {
|
22
22
|
return true;
|