Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:adaptyteam/onboardings-ios into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
x401om committed Aug 15, 2024
2 parents e374d65 + 2f01657 commit f5d69e3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Sources/Message/Params/OnboardingsDatePickerParams.swift
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
//
// OnboardingsDatePickerParams.swift
//
//
//
// Created by Aleksei Valiano on 09.08.2024
//
//
//

import Foundation

public struct OnboardingsDatePickerParams: Sendable, Hashable {
public let day: Int
public let month: Int
public let year: Int
public let day: Int?
public let month: Int?
public let year: Int?

init(_ body: BodyDecoder.Value) throws {
let body = try body.asDictionary()
self.day = try body["day"].asInt()
self.month = try body["month"].asInt()
self.year = try body["year"].asInt()
self.day = try body["day"].asOptionalInt()
self.month = try body["month"].asOptionalInt()
self.year = try body["year"].asOptionalInt()
}
}

extension OnboardingsDatePickerParams: CustomDebugStringConvertible {
public var debugDescription: String {
"{day: \(day), month: \(month), year: \(year)}"
"{day: \(day?.description ?? "nil"), month: \(month?.description ?? "nil"), year: \(year?.description ?? "nil")}"
}
}

0 comments on commit f5d69e3

Please sign in to comment.