litesoft
@ 850
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
package org.litesoft.core.typeutils; import java.util.*; import org.litesoft.core.simpletypes.temporal.*; import org.litesoft.core.simpletypes.temporal.nonpublic.*; public class Dates { public static Date now() { return new Date(); } public static SimpleDate forceEndOfMonth( SimpleDate pSimpleDate ) { if ( pSimpleDate != null ) { int zDaysInMonth = CalendarSupport.daysInMonth( pSimpleDate.getYear(), pSimpleDate.getMonth() ); if ( pSimpleDate.getDay() != zDaysInMonth ) { pSimpleDate.setDay( zDaysInMonth ); } } return pSimpleDate; } } |