Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
brandkbs2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenjunjie
brandkbs2
Commits
9fe3a82a
Commit
9fe3a82a
authored
Jan 05, 2024
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'master'
Release See merge request
!447
parents
a1d9d897
81dedb79
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/main/java/com/zhiwei/brandkbs2/util/IndexUtil.java
+4
-3
No files found.
src/main/java/com/zhiwei/brandkbs2/util/IndexUtil.java
View file @
9fe3a82a
...
@@ -58,16 +58,17 @@ public class IndexUtil {
...
@@ -58,16 +58,17 @@ public class IndexUtil {
start
=
truncDate
(
start
,
pattern
);
start
=
truncDate
(
start
,
pattern
);
end
=
truncDate
(
end
,
pattern
);
end
=
truncDate
(
end
,
pattern
);
List
<
String
>
list
=
Lists
.
newArrayList
();
List
<
String
>
list
=
Lists
.
newArrayList
();
Period
period
=
new
Period
(
start
.
getTime
(),
end
.
getTime
(),
PeriodType
.
months
());
Period
monthPeriod
=
new
Period
(
start
.
getTime
(),
end
.
getTime
(),
PeriodType
.
months
());
Period
yearPeriod
=
new
Period
(
start
.
getTime
(),
end
.
getTime
(),
PeriodType
.
years
());
switch
(
pattern
)
{
switch
(
pattern
)
{
case
"yyyy"
:
{
case
"yyyy"
:
{
for
(
int
i
=
0
;
i
<=
p
eriod
.
getYears
();
i
++)
{
for
(
int
i
=
0
;
i
<=
yearP
eriod
.
getYears
();
i
++)
{
list
.
add
(
index
+
"_"
+
DF_yyyy
.
format
(
DateUtils
.
addYears
(
start
,
i
)));
list
.
add
(
index
+
"_"
+
DF_yyyy
.
format
(
DateUtils
.
addYears
(
start
,
i
)));
}
}
break
;
break
;
}
}
case
"yyyyMM"
:
{
case
"yyyyMM"
:
{
for
(
int
i
=
0
;
i
<=
p
eriod
.
getMonths
();
i
++)
{
for
(
int
i
=
0
;
i
<=
monthP
eriod
.
getMonths
();
i
++)
{
list
.
add
(
index
+
"_"
+
DF_yyyyMM
.
format
(
DateUtils
.
addMonths
(
start
,
i
)));
list
.
add
(
index
+
"_"
+
DF_yyyyMM
.
format
(
DateUtils
.
addMonths
(
start
,
i
)));
}
}
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment