Mercurial Hosting > luan
comparison core/src/luan/modules/Time.luan @ 273:073044e3ac03
fix mmake.sh and multipart mail
git-svn-id: https://luan-java.googlecode.com/svn/trunk@274 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 31 Oct 2014 18:44:11 +0000 |
parents | eb27e765affb |
children | b669cdaf54b7 |
comparison
equal
deleted
inserted
replaced
272:eb27e765affb | 273:073044e3ac03 |
---|---|
35 end | 35 end |
36 return Table.unpack(rtn) | 36 return Table.unpack(rtn) |
37 end | 37 end |
38 | 38 |
39 function format(time,pattern) | 39 function format(time,pattern) |
40 pattern = pattern or "yyyy-MM-dd HH:m:ss" | |
40 return SimpleDateFormat.new(pattern).format(Date.new(time)) | 41 return SimpleDateFormat.new(pattern).format(Date.new(time)) |
41 end | 42 end |
42 | 43 |
43 function on( year, month, day, hour, minute, second, millis ) | 44 function on( year, month, day, hour, minute, second, millis ) |
44 month = month - 1 | 45 month = month - 1 |