Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
55cb66c2
Commit
55cb66c2
authored
Aug 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
胡雨辰-日期转化
parent
1ed49f3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
DateUtil.java
...om/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
+4
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
View file @
55cb66c2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
util
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.sms.MonthObject
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.sms.MonthObject
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -287,7 +288,9 @@ public class DateUtil {
...
@@ -287,7 +288,9 @@ public class DateUtil {
// setLenient avoids allowing dates like 9/32/2001
// setLenient avoids allowing dates like 9/32/2001
// which would otherwise parse to 10/2/2001
// which would otherwise parse to 10/2/2001
df
.
setLenient
(
false
);
df
.
setLenient
(
false
);
return
df
.
parse
(
dateText
.
replace
(
"/"
,
""
).
replace
(
"-"
,
""
));
return
df
.
parse
(
dateText
.
replace
(
"/"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
CommonConstants
.
YEAR
,
""
).
replace
(
CommonConstants
.
MONTH
,
""
)
.
replace
(
CommonConstants
.
DAY
,
""
));
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
return
null
;
return
null
;
...
...
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