Created
April 25, 2024 10:02
-
-
Save trycf/69e35d3cf8ab04a42fff75bbd066300a to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset time="19:50"> | |
<cfif time.find(":")> | |
<cfset local.hours = time.reMatch("(\d+):(\d+)(?::(\d+))?")> | |
<cfif arrayLen(local.hours) gt 0> | |
<cfset local.hours = local.hours[1]> | |
<cfset local.minutes = local.hours[2]> | |
<cfset local.seconds = local.hours[3]> | |
<cfif not isDefined("local.seconds")> | |
<cfset time = time & ":59"> | |
</cfif> | |
</cfif> | |
</cfif> | |
<cfdump var="#time#"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment