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  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: 594 / 588
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1007584 - formatDateAndTime - format a long timestamp in some general way (including time)