Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-11-04 12:47:50 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5f68ce51562d4446c99c11147f5de84d693b768d
5f68ce51
1 parent
66173462
fix history cell redeemed date
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
View file @
5f68ce5
...
...
@@ -102,7 +102,7 @@ extension AnalysisItemViewCell {
}
}
dateLabel
.
text
=
item
.
creat
ed
??
""
// expiration
dateLabel
.
text
=
item
.
redeem
ed
??
""
// expiration
// itemImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
// titleLabel.text = couponSetData?.name ?? ""
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
5f68ce5
...
...
@@ -565,6 +565,7 @@ public class swiftApi {
public
let
category
:
String
?
public
let
barcode
:
String
?
public
let
status
:
Int
?
public
let
redeemed
:
String
?
public
var
couponset_data
:
CouponSetItemModel
?
public
init
(
dictionary
:
[
String
:
Any
])
{
...
...
@@ -614,6 +615,23 @@ public class swiftApi {
self
.
created
=
""
}
if
let
changes_dates
=
dictionary
[
"changes_dates"
]
as?
[
String
:
Any
]
{
let
redeemedString
=
changes_dates
[
"redeemed"
]
as?
String
?
??
""
// Example redeemedString: "2022-11-03 17:08:21.285355";
let
dateFormatter3
=
DateFormatter
()
dateFormatter3
.
dateFormat
=
"yyyy-MM-dd HH:mm:ss.SSSSSS"
if
let
date
=
dateFormatter3
.
date
(
from
:
redeemedString
??
""
)
{
dateFormatter3
.
dateFormat
=
"dd/MM/yyyy"
let
resultString
=
dateFormatter3
.
string
(
from
:
date
)
self
.
redeemed
=
resultString
}
else
{
self
.
redeemed
=
""
}
}
else
{
self
.
redeemed
=
""
}
}
...
...
Please
register
or
login
to post a comment