1 | static int daysInMonth() { |
2 | long now = now(); |
3 | ret daysInMonth(localYear(now), localMonth(now)); |
4 | } |
5 | |
6 | static int daysInMonth(int year, int month) { |
7 | java.util.Calendar calendar = java.util.Calendar.getInstance(); |
8 | calendar.set(java.util.Calendar.YEAR, year); |
9 | calendar.set(java.util.Calendar.MONTH, month); |
10 | ret calendar.getActualMaximum(java.util.Calendar.DATE); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019308 |
Snippet name: | daysInMonth |
Eternal ID of this version: | #1019308/3 |
Text MD5: | 2c48a88d3a91af1521aa49b64834cde1 |
Author: | stefan |
Category: | javax / calendar |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-31 01:00:24 |
Source code size: | 379 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 327 / 377 |
Version history: | 2 change(s) |
Referenced in: | [show references] |