Libraryless. Click here for Pure Java version (116L/1K).
1 | import java.text.*; |
2 | |
3 | sS timeInTimeZoneWithOptionalDate_24(S timezone, long time) { |
4 | ret timeInTimeZoneWithOptionalDate_24(timeZone(timezone), time); |
5 | } |
6 | |
7 | sS timeInTimeZoneWithOptionalDate_24(TimeZone timezone, long time) { |
8 | SimpleDateFormat format = simpleDateFormat("yyyy/MM/dd", timezone); |
9 | S date = format.format(time); |
10 | bool needDate = neq(date, format.format(now())); |
11 | ret (needDate ? date + " " : "") + timeInTimeZone(timezone, time); |
12 | } |
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: | 227 / 352 |
Version history: | 3 change(s) |
Referenced in: | [show references] |