Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/69e35d3cf8ab04a42fff75bbd066300a to your computer and use it in GitHub Desktop.
Save trycf/69e35d3cf8ab04a42fff75bbd066300a to your computer and use it in GitHub Desktop.
TryCF Gist
<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