Libraryless. Click here for Pure Java version (116L/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); }
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: | 501bee9a9d5db8a0522d3c4208cd73ff |
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: | 228 / 353 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1026053 - timeInTimeZoneWithDate_24 |