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

12
LINES

< > BotCompany Repo | #1026051 // timeInTimeZoneWithOptionalDate_24

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Compilation Failed (87L/1K).

import java.text.*;

sS timeInTimeZoneWithOptionalDate_24(S timezone, long time) {
  ret timeInTimeZoneWithOptionalDate_24(timeZone(timezone), time);
}
  
sS timeInTimeZoneWithOptionalDate_24(TimeZone timezone, long time) {
  SimpleDateFormat format = simpleDateFormat("yyyy/MM/dd", timezone);
  S date = format.format(time);
  bool needDate = neq(date, format.format(now()));
  ret (needDate ? date + " " : "") + timeInTimeZone(timezone, time);
}

Author comment

Began life as a copy of #1026050

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026051
Snippet name: timeInTimeZoneWithOptionalDate_24
Eternal ID of this version: #1026051/4
Text MD5: 7155c6a802d3332f5c130c5e9a947196
Transpilation MD5: 7fc4b9f661a45afc72461c1badb1afc1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-28 17:29:33
Source code size: 458 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 154 / 253
Version history: 3 change(s)
Referenced in: [show references]