Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
TominagaTestProject
Project
Project
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
富永 健雄
TominagaTestProject
Commits
18a9ba2e
Commit
18a9ba2e
authored
Jun 16, 2022
by
WORKSHOP
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文字化けしたコメントを修正
parent
294ccb14
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Test1.java
Test/src/com/tomi/Test1.java
+4
-4
No files found.
Test/src/com/tomi/Test1.java
View file @
18a9ba2e
...
@@ -15,8 +15,7 @@ import org.junit.jupiter.api.Test;
...
@@ -15,8 +15,7 @@ import org.junit.jupiter.api.Test;
class
Test1
{
class
Test1
{
/**
/**
* {@link HttpClient}のサンプル
* {@link HttpClient}のサンプル
* Java11から登場した{@link HttpClient}クラスを使ったHTTP通信のサンプルです
*/
*/
@Test
@Test
...
@@ -64,12 +63,12 @@ class Test1 {
...
@@ -64,12 +63,12 @@ class Test1 {
System
.
out
.
printf
(
"ld = %02d/%02d/%02d\n"
,
ld
.
getYear
(),
ld
.
getMonthValue
(),
ld
.
getDayOfMonth
()
);
System
.
out
.
printf
(
"ld = %02d/%02d/%02d\n"
,
ld
.
getYear
(),
ld
.
getMonthValue
(),
ld
.
getDayOfMonth
()
);
System
.
out
.
printf
(
"%s
から本日までの日付 = %d日\n"
,
System
.
out
.
printf
(
"%s
から本日までの日付 = %d日
\n"
,
ld
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd"
)),
ld
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd"
)),
ChronoUnit
.
DAYS
.
between
(
ld
,
LocalDate
.
now
()));
ChronoUnit
.
DAYS
.
between
(
ld
,
LocalDate
.
now
()));
LocalDateTime
ldt
=
LocalDateTime
.
parse
(
"2022-03-13 22:10:00"
,
DateTimeFormatter
.
ofPattern
(
"yyy-MM-dd HH:mm:ss"
));
LocalDateTime
ldt
=
LocalDateTime
.
parse
(
"2022-03-13 22:10:00"
,
DateTimeFormatter
.
ofPattern
(
"yyy-MM-dd HH:mm:ss"
));
System
.
out
.
println
(
"2022-3-13 22:10:00
のL
ocalDateTime=>"
+
ldt
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyy-MM-dd HH:mm:ss"
)));
System
.
out
.
println
(
"2022-3-13 22:10:00
の
LocalDateTime=>"
+
ldt
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyy-MM-dd HH:mm:ss"
)));
}
}
}
}
\ No newline at end of file
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