Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
YZG
yzg-util
Commits
8500b40c
Commit
8500b40c
authored
Jul 06, 2023
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表结构修改
parent
6864d60d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
TestDateHelper.java
yzg-util-base/src/test/java/helper/TestDateHelper.java
+8
-0
No files found.
yzg-util-base/src/test/java/helper/TestDateHelper.java
View file @
8500b40c
...
...
@@ -58,4 +58,12 @@ public class TestDateHelper {
System
.
out
.
println
(
json
);
Assert
.
assertEquals
(
"[{\"from\":\"2023-07-01 10:00:00\",\"to\":\"2023-07-01 23:59:59\"},{\"from\":\"2023-07-02 00:00:00\",\"to\":\"2023-07-02 23:59:59\"},{\"from\":\"2023-07-03 00:00:00\",\"to\":\"2023-07-03 23:59:59\"},{\"from\":\"2023-07-04 00:00:00\",\"to\":\"2023-07-04 23:59:59\"},{\"from\":\"2023-07-05 00:00:00\",\"to\":\"2023-07-05 23:59:59\"},{\"from\":\"2023-07-06 00:00:00\",\"to\":\"2023-07-06 23:59:59\"},{\"from\":\"2023-07-07 00:00:00\",\"to\":\"2023-07-07 23:59:59\"},{\"from\":\"2023-07-08 00:00:00\",\"to\":\"2023-07-08 23:59:59\"},{\"from\":\"2023-07-09 00:00:00\",\"to\":\"2023-07-09 23:59:59\"},{\"from\":\"2023-07-10 00:00:00\",\"to\":\"2023-07-10 23:59:59\"},{\"from\":\"2023-07-11 00:00:00\",\"to\":\"2023-07-11 23:59:59\"},{\"from\":\"2023-07-12 00:00:00\",\"to\":\"2023-07-12 23:59:59\"},{\"from\":\"2023-07-13 00:00:00\",\"to\":\"2023-07-13 23:59:59\"},{\"from\":\"2023-07-14 00:00:00\",\"to\":\"2023-07-14 23:59:59\"},{\"from\":\"2023-07-15 00:00:00\",\"to\":\"2023-07-15 23:59:59\"},{\"from\":\"2023-07-16 00:00:00\",\"to\":\"2023-07-16 23:59:59\"},{\"from\":\"2023-07-17 00:00:00\",\"to\":\"2023-07-17 23:59:59\"},{\"from\":\"2023-07-18 00:00:00\",\"to\":\"2023-07-18 23:59:59\"},{\"from\":\"2023-07-19 00:00:00\",\"to\":\"2023-07-19 23:59:59\"},{\"from\":\"2023-07-20 00:00:00\",\"to\":\"2023-07-20 23:59:59\"},{\"from\":\"2023-07-21 00:00:00\",\"to\":\"2023-07-21 23:59:59\"},{\"from\":\"2023-07-22 00:00:00\",\"to\":\"2023-07-22 23:59:59\"},{\"from\":\"2023-07-23 00:00:00\",\"to\":\"2023-07-23 23:59:59\"},{\"from\":\"2023-07-24 00:00:00\",\"to\":\"2023-07-24 23:59:59\"},{\"from\":\"2023-07-25 00:00:00\",\"to\":\"2023-07-25 23:59:59\"},{\"from\":\"2023-07-26 00:00:00\",\"to\":\"2023-07-26 23:59:59\"},{\"from\":\"2023-07-27 00:00:00\",\"to\":\"2023-07-27 23:59:59\"},{\"from\":\"2023-07-28 00:00:00\",\"to\":\"2023-07-28 23:59:59\"},{\"from\":\"2023-07-29 00:00:00\",\"to\":\"2023-07-29 23:59:59\"},{\"from\":\"2023-07-30 00:00:00\",\"to\":\"2023-07-30 23:59:59\"},{\"from\":\"2023-07-31 00:00:00\",\"to\":\"2023-07-31 19:00:00\"}]"
,
json
);
}
@Test
public
void
testSplitDay1
()
{
List
<
DateHelper
.
Day
>
days
=
DateHelper
.
splitDayTime
(
new
DateHelper
.
Day
(
"2023-7-1 10:00:00"
,
"2023-7-1 19:00:00"
));
String
json
=
JsonHelper
.
serialize
(
days
);
System
.
out
.
println
(
json
);
Assert
.
assertEquals
(
"[{\"from\":\"2023-07-01 10:00:00\",\"to\":\"2023-07-01 19:00:00\"}]"
,
json
);
}
}
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