Google

Java ottenere l’ultimo giorno del mese

Written on:marzo 17, 2010
Comments
Add One

Ecco un esempio su come ottenere l’utlimo giorno del mese:

public static Date ottieniUltimoGiornoDelMese(Calendar cal) {
	cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
	cal.set(Calendar.HOUR, 23);
	cal.set(Calendar.MINUTE, 59);
	cal.set(Calendar.SECOND, 59);
	return cal.getTime();
}

Condividi su

googlebuzz Java ottenere lultimo giorno del mese
googleplus Java ottenere lultimo giorno del mese

Leave a Comment

L'indirizzo email non verrĂ  pubblicato. I campi obbligatori sono contrassegnati *

*

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Web Statistics