1 | static S formatDate() { |
2 | ret formatDate(now()); |
3 | } |
4 | |
5 | static S formatDate(long timestamp) { |
6 | ret timestamp == 0 ? "-" : str(new Date(timestamp)); |
7 | } |
8 | |
9 | sS formatDate(long timestamp, S format, TimeZone tz) { |
10 | ret simpleDateFormat(format, tz).format(timestamp); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1003290 |
Snippet name: | formatDate - format a long timestamp in some general way |
Eternal ID of this version: | #1003290/4 |
Text MD5: | 69b37053a820d1cba915ff23fcb29ab5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-06-29 19:47:22 |
Source code size: | 268 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 659 / 663 |
Version history: | 3 change(s) |
Referenced in: | [show references] |