Mercurial Hosting > luan
comparison core/src/luan/modules/Time.luan @ 587:fa281ee942c8
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 24 Aug 2015 04:43:55 -0600 |
parents | 92c3d22745b8 |
children | b4f3dbe1c6e3 |
comparison
equal
deleted
inserted
replaced
586:a140be489a72 | 587:fa281ee942c8 |
---|---|
39 end | 39 end |
40 return Table.unpack(rtn) | 40 return Table.unpack(rtn) |
41 end | 41 end |
42 | 42 |
43 function M.format(time,pattern) | 43 function M.format(time,pattern) |
44 pattern = pattern or "yyyy-MM-dd HH:m:ss" | 44 pattern = pattern or "yyyy-MM-dd HH:mm:ss" |
45 return SimpleDateFormat.new(pattern).format(Date.new(time)) | 45 return SimpleDateFormat.new(pattern).format(Date.new(time)) |
46 end | 46 end |
47 | 47 |
48 function M.on( year, month, day, hour, minute, second, millis ) | 48 function M.on( year, month, day, hour, minute, second, millis ) |
49 month = month - 1 | 49 month = month - 1 |