Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
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
mobile-group
galaxy-iOS
Commits
f6b03bd8
Commit
f6b03bd8
authored
Aug 24, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间点判断
parent
534833e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
YHSelectApplicantGroupCell.swift
...tCertificate(3 赴港办证预约)/V/YHSelectApplicantGroupCell.swift
+38
-0
YHUploadCertificateDetailVC.swift
...dCertificate(7上传过关证件)/C/YHUploadCertificateDetailVC.swift
+0
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHSelectApplicantGroupCell.swift
View file @
f6b03bd8
...
...
@@ -484,6 +484,14 @@ private extension YHSelectApplicantGroupCell {
guard
let
self
=
self
else
{
return
}
//1.判断选择的日期是否不在今天之前
if
!
dateLessGreatToday
(
date
:
dateStr
)
{
YHHUD
.
flash
(
message
:
"不能选择今天之前的日期"
)
return
}
//2.
if
let
model
=
dataModel
?
.
model
{
if
!
showHKHolidayWarmTips
(
startDateStr
:
dateStr
,
endDateStr
:
nil
)
{
model
.
detailDateStr
=
dateStr
...
...
@@ -494,6 +502,36 @@ private extension YHSelectApplicantGroupCell {
}
}
func
dateLessGreatToday
(
date
:
String
)
->
Bool
{
if
date
.
count
==
"2022.02.02"
.
count
{
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy-MM-dd"
// 假设我们有两个日期
if
let
date1
=
dateFormatter
.
date
(
from
:
date
)
{
let
today
=
Date
()
// 使用Calendar比较两个日期
let
calendar
=
Calendar
(
identifier
:
.
chinese
)
let
comparisonResult
=
calendar
.
compare
(
today
,
to
:
date1
,
toGranularity
:
.
day
)
switch
comparisonResult
{
case
.
orderedAscending
:
return
true
case
.
orderedDescending
:
print
(
"第一个日期在第二个日期之后"
)
return
false
case
.
orderedSame
:
return
true
}
}
}
return
false
}
// 选择时间段
func
selectDurationTime
()
{
let
view
=
YHRangeDatePickerSheetView
.
sheetView
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/UploadCertificate(7上传过关证件)/C/YHUploadCertificateDetailVC.swift
View file @
f6b03bd8
...
...
@@ -185,7 +185,6 @@ private extension YHUploadCertificateDetailVC {
}
//检验先后 startDateStr < endDateStr
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy-MM-dd"
...
...
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