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

11
LINES

< > BotCompany Repo | #1004679 // ymd

JavaX fragment (include)

1  
sS ymd() {
2  
  ret ymd(now());
3  
}
4  
5  
sS ymd(long now) {
6  
  ret year(now) + formatInt(month(now), 2) + formatInt(dayOfMonth(now), 2);
7  
}
8  
9  
sS ymd(long now, TimeZone tz) {
10  
  ret year(now, tz) + formatInt(month(now, tz), 2) + formatInt(dayOfMonth(now, tz), 2);
11  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004679
Snippet name: ymd
Eternal ID of this version: #1004679/3
Text MD5: df5dc2a2ee9d5eed2913f10bcf8ef834
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-29 12:35:30
Source code size: 261 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 629 / 630
Version history: 2 change(s)
Referenced in: [show references]