UNPKG

@lomray/microservice-payment-stripe

Version:

Stripe payment microservice based on NodeJS & inverted json.

14 lines (11 loc) 336 B
'use strict'; /** * Returns composed card expiration * NOTE: Compatible with the stripe */ const toExpirationDate = (month, year) => { const formattedYear = String(year).slice(-2); const formattedMonth = String(month).padStart(2, '0'); return `${formattedMonth}/${formattedYear}`; }; module.exports = toExpirationDate;