Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getValidityPeriod format YYMMDDhhmmssUTCR #115

Open
parsibox opened this issue Jul 4, 2023 · 0 comments
Open

getValidityPeriod format YYMMDDhhmmssUTCR #115

parsibox opened this issue Jul 4, 2023 · 0 comments

Comments

@parsibox
Copy link

parsibox commented Jul 4, 2023

hi
we need another format for validity period
update this with this code:


func convertValidityIrancell(d time.Duration) string {
	minutes := int(d / time.Minute)

	hours := minutes / 60
	minutes %= 60

	days := hours / 24
	hours %= 24
	//YYMMDDhhmmssUTCR
	formatted := fmt.Sprintf("%02d%02d%02d%02d%02d%02d000R",
		0, 0, days,
		hours, minutes, 0)

	return formatted
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant