Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1003290 - formatDate - format a long timestamp in some general way

JavaX fragment (include)

static S formatDate() {
  ret formatDate(now());
}

static S formatDate(long timestamp) {
  ret timestamp == 0 ? "-" : str(new Date(timestamp));
}

sS formatDate(long timestamp, S format, TimeZone tz) {
  ret simpleDateFormat(format, tz).format(timestamp);
}

download  show line numbers  debug dex   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, 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: 455 / 435
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1003290 & http://1003290.tinybrain.de