FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java-code-example/!temp/src/DateTemp.java at master · cherkavi/java-code-example · GitHub
cherkavi
/
java-code-example
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
0
Code
Issues
0
Pull requests
42
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java-code-example
/
!temp
/
src
/
DateTemp.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
23 lines (18 loc) · 624 Bytes
Breadcrumbs
java-code-example
/
!temp
/
src
/
DateTemp.java
Copy path
File metadata and controls
executable file
·
23 lines (18 loc) · 624 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import
java
.
text
.
SimpleDateFormat
;
import
java
.
util
.
Calendar
;
import
java
.
util
.
Date
;
public
class
DateTemp
{
/**
* @param args
*/
public
static
void
main
(
String
[]
args
){
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"dd.MM.yyyy HH.mm.ss.SSS"
);
Calendar
calendarBegin
=
Calendar
.
getInstance
();
Calendar
calendarEnd
=
Calendar
.
getInstance
();
calendarEnd
.
add
(
Calendar
.
DAY_OF_MONTH
, +
2
);
Date
dateBegin
=
calendarBegin
.
getTime
();
Date
dateEnd
=
calendarEnd
.
getTime
();
System
.
out
.
println
(
"Date begin:"
+
sdf
.
format
(
dateBegin
));
System
.
out
.
println
(
"Date end:"
+
sdf
.
format
(
dateEnd
));
}
}
Back
|
FazBrowse Home
|
New Git URL