{"id":954,"date":"2018-09-17T18:48:48","date_gmt":"2018-09-17T09:48:48","guid":{"rendered":"https:\/\/chat-messenger.com\/?p=954"},"modified":"2018-12-23T01:52:35","modified_gmt":"2018-12-22T16:52:35","slug":"calculating-dates","status":"publish","type":"post","link":"https:\/\/chat-messenger.com\/th\/\u0e1a\u0e25\u0e47\u0e2d\u0e01\/java\/\u0e01\u0e33\u0e25\u0e31\u0e07\u0e04\u0e33\u0e19\u0e27\u0e13\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48","title":{"rendered":"\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32 Java \u0e01\u0e32\u0e23\u0e1a\u0e27\u0e01\u0e41\u0e25\u0e30\u0e01\u0e32\u0e23\u0e25\u0e1a\u0e17\u0e33\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22"},"content":{"rendered":"<h2 class=\"common_title\"><a name=\"0\">\u0e0a\u0e27\u0e32 <strong>\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32<\/strong>\u0e01\u0e32\u0e23\u0e1a\u0e27\u0e01\u0e41\u0e25\u0e30\u0e01\u0e32\u0e23\u0e25\u0e1a\u0e17\u0e33\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22<\/a><\/h2>\n<p>\n\u0e07\u0e48\u0e32\u0e22 \u0e46 \u0e14\u0e49\u0e27\u0e22\u0e08\u0e32\u0e27\u0e32<strong>\u0e04\u0e33\u0e19\u0e27\u0e13\u0e01\u0e32\u0e23\u0e1a\u0e27\u0e01\/\u0e25\u0e1a\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32<\/strong>\u0e41\u0e19\u0e30\u0e19\u0e33\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e17\u0e33\u0e2a\u0e34\u0e48\u0e07\u0e19\u0e35\u0e49<br \/>\u0e25\u0e31\u0e01\u0e29\u0e13\u0e30\u0e02\u0e2d\u0e07\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e21\u0e35\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<ul>\n<li>\u0e2a\u0e48\u0e07\u0e01\u0e25\u0e31\u0e1a\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c\u0e02\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2b\u0e23\u0e37\u0e2d\u0e25\u0e1a\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38\u0e08\u0e32\u0e01\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/li>\n<li>\u0e2b\u0e32\u0e01\u0e23\u0e30\u0e1a\u0e38\u0e08\u0e33\u0e19\u0e27\u0e19\u0e1a\u0e27\u0e01 \u0e40\u0e27\u0e25\u0e32\u0e08\u0e30\u0e40\u0e23\u0e47\u0e27\u0e02\u0e36\u0e49\u0e19 \u0e2b\u0e32\u0e01\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e48\u0e32\u0e25\u0e1a \u0e40\u0e27\u0e25\u0e32\u0e08\u0e30\u0e16\u0e2d\u0e22\u0e2b\u0e25\u0e31\u0e07<br \/>\n\u0e40\u0e0a\u0e48\u0e19 10 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27\u0e19\u0e31\u0e1a\u0e08\u0e32\u0e01\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19<strong>\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13<\/strong>\u0e2b\u0e32\u0e01\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e0a\u0e48\u0e19\u0e19\u0e31\u0e49\u0e19 \u0e08\u0e30\u0e21\u0e35\u0e1c\u0e25\u0e14\u0e31\u0e07\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<br \/>\n<b>\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19 cal = addMonth(-10);<\/b>\n<\/li>\n<li>\u0e04\u0e38\u0e13\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32\u0e40\u0e17\u0e48\u0e32\u0e43\u0e14\u0e01\u0e47\u0e44\u0e14\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1f\u0e34\u0e25\u0e14\u0e4c\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e35 \u0e40\u0e14\u0e37\u0e2d\u0e19 \u0e27\u0e31\u0e19 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07 \u0e19\u0e32\u0e17\u0e35 \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 \u0e41\u0e25\u0e30\u0e21\u0e34\u0e25\u0e25\u0e34\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35<br \/>\n\u0e2d\u0e35\u0e01\u0e17\u0e31\u0e49\u0e07\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c\u0e01\u0e31\u0e1a\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e14\u0e49\u0e27\u0e22<strong>\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13<\/strong>\u0e2b\u0e32\u0e01\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e0a\u0e48\u0e19\u0e19\u0e31\u0e49\u0e19 \u0e43\u0e2b\u0e49\u0e2a\u0e48\u0e07\u0e04\u0e25\u0e32\u0e2a Calendar \u0e40\u0e1b\u0e47\u0e19\u0e2d\u0e32\u0e23\u0e4c\u0e01\u0e34\u0e27\u0e40\u0e21\u0e19\u0e15\u0e4c<br \/>\n\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e0a\u0e48\u0e19 \u0e2a\u0e34\u0e48\u0e07\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e08\u0e30\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e2d\u0e34\u0e19\u0e2a\u0e41\u0e15\u0e19\u0e0b\u0e4c\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38\u0e01\u0e49\u0e32\u0e27\u0e2b\u0e19\u0e49\u0e32\u0e44\u0e1b\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e1b\u0e35<br \/>\n<b>\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19 cal = \u0e40\u0e1e\u0e34\u0e48\u0e21 (&quot;\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38&quot;,1,0,0,0,0,0,0);<\/b>\n<\/li>\n<li>\u0e2b\u0e32\u0e01\u0e04\u0e48\u0e32\u0e02\u0e2d\u0e07\u0e0a\u0e48\u0e2d\u0e07\u0e40\u0e27\u0e25\u0e32\u0e41\u0e15\u0e48\u0e25\u0e30\u0e0a\u0e48\u0e2d\u0e07\u0e40\u0e01\u0e34\u0e19\u0e0a\u0e48\u0e27\u0e07 \u0e0a\u0e48\u0e2d\u0e07\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e43\u0e2b\u0e0d\u0e48\u0e01\u0e27\u0e48\u0e32\u0e16\u0e31\u0e14\u0e44\u0e1b\u0e08\u0e30\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e02\u0e36\u0e49\u0e19\u0e2b\u0e23\u0e37\u0e2d\u0e25\u0e14\u0e25\u0e07<br \/>\n\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e0a\u0e48\u0e19 \u0e40\u0e27\u0e25\u0e32\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e08\u0e30\u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32 1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07 5 \u0e19\u0e32\u0e17\u0e35<br \/>\n<b>\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19 cal = addMinute (65);<\/b>\n<\/li>\n<\/ul>\n<p><script type=\"text\/javascript\" src=\"https:\/\/chat-messenger.com\/js\/common.js?dd12sssas2223\" charset=\"UTF-8\"><\/script><br \/>\n<script type=\"text\/javascript\"> writePR(); <\/script><\/p>\n<h2 class=\"common_title\"><a name=\"2\">\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/a><\/h2>\n<p><textarea readonly=\"readonly\" style=\"font-size: 13px;height: 400px;\" class=\"src\" onclick=\"this.focus();this.select()\">\/**<br \/>\n * \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u304b\u3089\u6307\u5b9a\u306e\u3010\u5e74\u6570\u3011\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n * @param addYera \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u5e74\u6570<br \/>\n * @return    \u8a08\u7b97\u5f8c\u306e Calendar \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002<br \/>\n *\/<br \/>\npublic static Calendar addYera(int addYera){<br \/>\n    return add(null,addYera,0,0,0,0,0,0);<br \/>\n}<br \/>\n\/**<br \/>\n * \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u304b\u3089\u6307\u5b9a\u306e\u3010\u6708\u6570\u3011\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n * @param addMonth \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u6708\u6570<br \/>\n * @return    \u8a08\u7b97\u5f8c\u306e Calendar \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002<br \/>\n *\/<br \/>\npublic static Calendar addMonth(int addMonth){<br \/>\n    return add(null,0,addMonth,0,0,0,0,0);<br \/>\n}<br \/>\n\/**<br \/>\n * \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u304b\u3089\u6307\u5b9a\u306e\u3010\u65e5\u6570\u3011\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n * @param addDate \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u65e5\u6570<br \/>\n * @return    \u8a08\u7b97\u5f8c\u306e Calendar \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002<br \/>\n *\/<br \/>\npublic static Calendar addDate(int addDate){<br \/>\n    return add(null,0,0,addDate,0,0,0,0);<br \/>\n}<br \/>\n\/**<br \/>\n * \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u304b\u3089\u6307\u5b9a\u306e\u3010\u6642\u9593\u3011\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n * @param addHour \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u6642\u9593<br \/>\n * @return    \u8a08\u7b97\u5f8c\u306e Calendar \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002<br \/>\n *\/<br \/>\npublic static Calendar addHour(int addHour){<br \/>\n    return add(null,0,0,0,addHour,0,0,0);<br \/>\n}<br \/>\n\/**<br \/>\n * \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u304b\u3089\u6307\u5b9a\u306e\u3010\u5206\u3011\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n * @param addMinute \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u5206<br \/>\n * @return    \u8a08\u7b97\u5f8c\u306e Calendar \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002<br \/>\n *\/<br \/>\npublic static Calendar addMinute(int addMinute){<br \/>\n    return add(null,0,0,0,0,addMinute,0,0);<br \/>\n}<br \/>\n\/**<br \/>\n * \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u304b\u3089\u6307\u5b9a\u306e\u3010\u79d2\u3011\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n * @param addSecond \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u79d2<br \/>\n * @return    \u8a08\u7b97\u5f8c\u306e Calendar \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002<br \/>\n *\/<br \/>\npublic static Calendar addSecond(int addSecond){<br \/>\n    return add(null,0,0,0,0,0,addSecond,0);<br \/>\n}<br \/>\n\/**<br \/>\n * \u73fe\u5728\u306e\u65e5\u4ed8\u30fb\u6642\u523b\u304b\u3089\u6307\u5b9a\u306e\u6642\u9593\u91cf\u3092\u52a0\u7b97\u30fb\u6e1b\u7b97\u3057\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n * \u5e74\u3001\u6708\u3001\u65e5\u3001\u6642\u9593\u3001\u5206\u3001\u79d2\u3001\u30df\u30ea\u79d2\u306e\u5404\u6642\u9593\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u3057\u3001<br \/>\n * \u4efb\u610f\u306e\u6642\u9593\u91cf\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<br \/>\n * \u305f\u3068\u3048\u3070\u3001\u73fe\u5728\u306e\u65e5\u4ed8\u6642\u523b\u304b\u3089 10 \u65e5\u524d\u3092\u8a08\u7b97\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n * Calendar cal = add(null,0,0,-10,0,0,0,0);<br \/>\n *<br \/>\n * \u5404\u6642\u9593\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u304c\u305d\u306e\u7bc4\u56f2\u3092\u8d85\u3048\u305f\u5834\u5408\u3001\u6b21\u306e\u5927\u304d\u3044\u6642\u9593\u30d5\u30a3\u30fc\u30eb\u30c9\u304c<br \/>\n * \u5897\u5206\u307e\u305f\u306f\u6e1b\u5206\u3055\u308c\u307e\u3059\u3002<br \/>\n * \u305f\u3068\u3048\u3070\u3001\u4ee5\u4e0b\u3067\u306f1\u6642\u9593\u30685\u5206\u9032\u3081\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n * Calendar cal = add(null,0,0,0,0,65,0,0);<br \/>\n *<br \/>\n * \u5404\u6642\u9593\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u8a2d\u5b9a\u3059\u308b\u6570\u91cf\u304c0\u306e\u5834\u5408\u306f\u3001\u73fe\u5728\u306e\u5024\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<br \/>\n * java.util.GregorianCalendar\u306e\u5185\u90e8\u51e6\u7406\u3067\u306f\u4ee5\u4e0b\u306e\u5206\u5c90\u3092\u884c\u3063\u3066\u3044\u308b\u3002<br \/>\n *     if (amount == 0) {<br \/>\n *         return;<br \/>\n *     }<br \/>\n *<br \/>\n * @param cal \u65e5\u4ed8\u6642\u523b\u306e\u6307\u5b9a\u304c\u3042\u308c\u3070\u30bb\u30c3\u30c8\u3059\u308b\u3002<br \/>\n *     null\u306e\u5834\u5408\u3001\u73fe\u5728\u306e\u65e5\u4ed8\u6642\u523b\u3067\u65b0\u3057\u3044Calendar\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u3002<br \/>\n * @param addYera \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u5e74\u6570<br \/>\n * @param addMonth \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u6708\u6570<br \/>\n * @param addDate \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u65e5\u6570<br \/>\n * @param addHour \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u6642\u9593<br \/>\n * @param addMinute \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u5206<br \/>\n * @param addSecond \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u79d2<br \/>\n * @param addMillisecond \u52a0\u7b97\u30fb\u6e1b\u7b97\u3059\u308b\u30df\u30ea\u79d2<br \/>\n * @return    \u8a08\u7b97\u5f8c\u306e Calendar \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002<br \/>\n *\/<br \/>\npublic static Calendar add(Calendar cal,<br \/>\n                           int addYera,int addMonth,int addDate,<br \/>\n                           int addHour,int addMinute,int addSecond,<br \/>\n                           int addMillisecond){<br \/>\n    if (cal == null) {<br \/>\n        cal = Calendar.getInstance();<br \/>\n    }<br \/>\n    cal.add(Calendar.YEAR, addYera);<br \/>\n    cal.add(Calendar.MONTH, addMonth);<br \/>\n    cal.add(Calendar.DATE, addDate);<br \/>\n    cal.add(Calendar.HOUR_OF_DAY, addHour);<br \/>\n    cal.add(Calendar.MINUTE, addMinute);<br \/>\n    cal.add(Calendar.SECOND, addSecond);<br \/>\n    cal.add(Calendar.MILLISECOND, addMillisecond);<br \/>\n    return cal;<br \/>\n}<br \/>\n<\/textarea><br \/>\n<\/p>\n<h2 class=\"common_title\"><a name=\"3\">\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23<\/a><\/h2>\n<p>\n\u0e43\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e2a\u0e48\u0e07\u0e04\u0e37\u0e19<strong>\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13<\/strong>\u0e40\u0e19\u0e37\u0e48\u0e2d\u0e07\u0e08\u0e32\u0e01\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e23\u0e31\u0e1a\u0e2d\u0e47\u0e2d\u0e1a\u0e40\u0e08\u0e47\u0e01\u0e15\u0e4c java.util.Calendar \u0e17\u0e35\u0e48\u0e40\u0e01\u0e47\u0e1a\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e44\u0e14\u0e49 \u0e40\u0e23\u0e32\u0e08\u0e36\u0e07\u0e43\u0e0a\u0e49\u0e40\u0e21\u0e18\u0e2d\u0e14 java.util.Calendar#getTime() \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19 java.util.Date \u0e41\u0e25\u0e30 java.text.SimpleDateFormat \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e2a\u0e15\u0e23\u0e34\u0e07\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 .\n<\/p>\n<p>\u25c6\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23<\/p>\n<pre class=\"sample_src\">\u0e42\u0e21\u0e06\u0e30\u0e04\u0e07\u0e2a\u0e32\u0e18\u0e32\u0e23\u0e13\u0e30 main (String [] args) { SimpleDateFormat f = new SimpleDateFormat (&quot;yyyy\/MM\/dd HH:mm:ss&quot;); System.out.println (&quot;\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19 = &quot;+ f.format ( \u0e40\u0e1e\u0e34\u0e48\u0e21 (null,0,0,0,0,0,0,0).getTime())); System.out.println(&quot;\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32 1 \u0e1b\u0e35\u0e15\u0e48\u0e2d\u0e21\u0e32 = &quot;+ f.format(addYera(1) .getTime ())); System.out.println(&quot;\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32 1 \u0e40\u0e14\u0e37\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e1c\u0e48\u0e32\u0e19\u0e21\u0e32 = &quot;+ f.format(addMonth(-1).getTime())); System.out.println(&quot;3 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\u0e15\u0e48\u0e2d\u0e21\u0e32 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32 = &quot;+ f.format(addHour(3).getTime())); System.out.println(&quot;\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32 30 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 = &quot;+ f.format(addHour(-30).getTime ())); System.out.println(&quot;\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01 40 \u0e19\u0e32\u0e17\u0e35 = &quot;+ f.format(addMinute(40).getTime())); System.out.println(&quot;\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01 80 \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 = &quot;+ f.format (addMinute(40).getTime())); Time = &quot;+ f.format(addSecond(80).getTime())); System.out.println(&quot;\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32 4 \u0e27\u0e31\u0e19\u0e08\u0e32\u0e01 1 \u0e40\u0e14\u0e37\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 = &quot;+ f.format(\u0e40\u0e1e\u0e34\u0e48\u0e21(null,0, -1,4,0,0,0,0).getTime())); }\r\n<\/pre>\n<p>\u25c6\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23<br \/>\n\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e04\u0e37\u0e2d 2551\/03\/25 00:00:00 \u0e19.<\/p>\n<pre class=\"console\">\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19 = 2551\/08 00:00:00 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e1b\u0e35\u0e43\u0e2b\u0e49\u0e2b\u0e25\u0e31\u0e07 = 2552\/03\/2552 00:00:00 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e1c\u0e48\u0e32\u0e19\u0e21\u0e32 = 2551\/02\/2551 00:00 :00 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 \u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 3 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\u0e15\u0e48\u0e2d\u0e21\u0e32 = 2551\/03\/25 03:00:00 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 30 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 = 2008\/03\/23 18:00:00 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 40 \u0e19\u0e32\u0e17\u0e35\u0e15\u0e48\u0e2d\u0e21\u0e32 = 2008\/03\/ 25 00:40:00 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 80 \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35\u0e15\u0e48\u0e2d\u0e21\u0e32 = 25\/03\/2551 00:01:20 \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32 4 \u0e27\u0e31\u0e19\u0e08\u0e32\u0e01 1 \u0e40\u0e14\u0e37\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e1c\u0e48\u0e32\u0e19\u0e21\u0e32 = 29\/02\/2551 00:00:00\r\n<\/pre>\n<p>*2008 \u0e40\u0e1b\u0e47\u0e19\u0e1b\u0e35\u0e2d\u0e18\u0e34\u0e01\u0e2a\u0e38\u0e23\u0e17\u0e34\u0e19 \u0e14\u0e31\u0e07\u0e19\u0e31\u0e49\u0e19\u0e27\u0e31\u0e19\u0e2a\u0e38\u0e14\u0e17\u0e49\u0e32\u0e22\u0e02\u0e2d\u0e07\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 29<\/p>\n<p>\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49\u0e21\u0e35\u0e44\u0e27\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a Chat&amp;Messenger<a href=\"https:\/\/chat-messenger.com\/th\/\u0e04\u0e39\u0e48\u0e21\u0e37\u0e2d\/schedule_calendar\/\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\/\" title=\"\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\/\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e01\u0e32\u0e23\">\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\/\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e01\u0e32\u0e23<\/a>\u201d \u0e16\u0e39\u0e01\u0e19\u0e33\u0e21\u0e32\u0e43\u0e0a\u0e49\u0e08\u0e23\u0e34\u0e07<\/p>","protected":false},"excerpt":{"rendered":"<p>\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32 Java \u0e01\u0e32\u0e23\u0e1a\u0e27\u0e01\/\u0e01\u0e32\u0e23\u0e25\u0e1a\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e07\u0e48\u0e32\u0e22 \u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e01\u0e32\u0e23\u0e1a\u0e27\u0e01\/\u0e01\u0e32\u0e23\u0e25\u0e1a\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\/\u0e40\u0e27\u0e25\u0e32\u0e43\u0e19 Java [\u2026]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":""},"categories":[19],"tags":[],"_links":{"self":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/954"}],"collection":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/comments?post=954"}],"version-history":[{"count":6,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/954\/revisions"}],"predecessor-version":[{"id":1877,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/954\/revisions\/1877"}],"wp:attachment":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/media?parent=954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/categories?post=954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/tags?post=954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}