Commit 4832ca0e authored by Steven杜宇's avatar Steven杜宇

// 日期格式

parent bff1d87e
......@@ -181,7 +181,7 @@ extension YHPrincipleApprovedWaitSubmitVC {
let str1: ASAttributedString = .init("您【与家人】申请的【优秀人才入境计划】,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let str2: ASAttributedString = .init("已获得港府的甄选名额", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let str3: ASAttributedString = .init(",请您于", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let time: ASAttributedString = .init("\(self.viewModel.envelopModel.date)", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let time: ASAttributedString = .init("\(self.viewModel.envelopModel.convertDateFormat())", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let str4: ASAttributedString = .init("前补充更多文件,即可等待获得港府的正式批准!", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
detailLabel.attributed.text = str1 + str2 + str3 + time + str4
view.addSubview(detailLabel)
......
......@@ -467,7 +467,7 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
let str1: ASAttributedString = .init("您【与家人】申请的【优秀人才入境计划】,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let str2: ASAttributedString = .init("已获得港府的甄选名额", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let str3: ASAttributedString = .init(",请您于", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let time: ASAttributedString = .init("\(self.viewModel.uploadDetailModel.date)", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let time: ASAttributedString = .init("\(self.viewModel.uploadDetailModel.convertDateFormat())", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let str4: ASAttributedString = .init("前补充更多文件,即可等待获得港府的正式批准!", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
detailLabel.attributed.text = str1 + str2 + str3 + time + str4
view.addSubview(detailLabel)
......
......@@ -19,6 +19,17 @@ class YHPrincipleEnvelopeModel: SmartCodable {
var date: String = ""
var sex: Int = 0
func convertDateFormat() -> String {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd"
if let date = dateFormatter.date(from: date) {
dateFormatter.dateFormat = "yyyy年MM月dd日"
return dateFormatter.string(from: date)
}
return date
}
required init() {
}
......
......@@ -16,6 +16,17 @@ class YHPrincipleUploadDetailModel: SmartCodable {
var applicant: YHPrincipleApplicantModel = YHPrincipleApplicantModel()
var file_data: YHPrincipleFileDataModel = YHPrincipleFileDataModel()
func convertDateFormat() -> String {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd"
if let date = dateFormatter.date(from: date) {
dateFormatter.dateFormat = "yyyy年MM月dd日"
return dateFormatter.string(from: date)
}
return date
}
required init() {
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment