Fix formatExpiryDate
commit8f8b786ab1bd023ed8a1aa1fe6c0d65fefa9baee
authorCatherine Galkina <catherine@typeable.io>
dateThu 20 Mar 2025, 13:40 (2 years ago)
parent0b6b055
src/Data/CreditCard.hs+1−1
@@ -119,7 +119,7 @@ makeLenses ''CreditCardDate
119119formatExpiryDate :: CreditCardDate -> Text
120120formatExpiryDate ccd = s2 (ccd ^. ccdMonth) <> s2 (ccd ^. ccdYear - 2000)
121121 where
122− s2 = T.justifyLeft 2 '0' . T.pack . show
122+ s2 = T.justifyRight 2 '0' . T.pack . show
123123
124124-- NOTE: This function is supposed to be called 'parseExpiryDate',
125125-- but we already have a function with the same name in b2b/api