Skip to content

getValidityPeriod format YYMMDDhhmmssUTCR #115

Open
@parsibox

Description

@parsibox

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions