Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function output( datetime, output )
- local pattern = "(%d+)\-(%d+)\-(%d+)T(%d+)\:(%d+)\:(%d+)\+"
- Y, m, d, H, n, i = string.match( datetime, pattern )
- if nil == Y then
- return datetime
- end
- output = output.gsub( output, "Y", Y )
- output = output.gsub( output, "m", m )
- output = output.gsub( output, "d", d )
- output = output.gsub( output, "H", H )
- output = output.gsub( output, "n", n )
- output = output.gsub( output, "i", i )
- return output
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement