tag:blogger.com,1999:blog-5396570633771229267.post1242423098736206405..comments2024-03-03T14:43:52.399+01:00Comments on The BalusC Code: CalendarUtilBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5396570633771229267.post-6530086074462117222010-02-15T15:50:22.970+01:002010-02-15T15:50:22.970+01:00thanks for your code sharing.
i was thinking for y...thanks for your code sharing.<br />i was thinking for your elapsed code, wouldn't the Duration object be more helpful, like the next:<br /><br />public Duration durationBetween(Calendar start, Calendar end) {<br /> DatatypeFactory df = null;<br /> try {<br /> df = DatatypeFactory.newInstance();<br /> } catch (DatatypeConfigurationException e) {<br />Qussay Najjarhttps://www.blogger.com/profile/16507958945752794080noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-7463809064824673122009-12-04T20:44:37.076+01:002009-12-04T20:44:37.076+01:00Hi BalusC,
I have been using your code for a whil...Hi BalusC,<br /><br />I have been using your code for a while. These days, I have faced a problem with Daylight Saving Time when calculating time elapsed between two months. If inside this period has a DST change, the elapsed time can go grow or shrink.<br />I have made a workaround, but it was far ugly than your original code:<br /><br /><br /> private static int elapsed(Calendar before, Feijó, Diegohttps://www.blogger.com/profile/10377816432121076000noreply@blogger.com