Skip to content

Instantly share code, notes, and snippets.

@cachafla
Created January 22, 2009 07:16
Show Gist options
  • Save cachafla/50461 to your computer and use it in GitHub Desktop.
Save cachafla/50461 to your computer and use it in GitHub Desktop.
def format_consecutivo(num)
cero = "0"
times = 4 - num.to_s.size
return cero*times + num.to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment