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

8
LINES

< > BotCompany Repo | #1009026 // formatGMTWithOptionalDate_24

JavaX fragment (include)

import java.text.*;

static S formatGMTWithOptionalDate_24(long time) {
  SimpleDateFormat format = simpleDateFormat_GMT("yyyy/MM/dd");
  S date = format.format(time);
  bool needDate = neq(date, format.format(now()));
  ret (needDate ? date + " " : "") + formatGMT_24(time);
}

Author comment

Began life as a copy of #1008488

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009026
Snippet name: formatGMTWithOptionalDate_24
Eternal ID of this version: #1009026/2
Text MD5: c52df3830f093c3ebf58f1daf953e682
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-28 18:58:07
Source code size: 284 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 536 / 580
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1010772 - formatGMTWithDate_24 - always adds date
#1011359 - renderGMTDate - synonym of formatGMTWithOptionalDate_24
#1012292 - dateWithTimeGMT
#1026050 - localTimeWithOptionalDate_24