KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > common > ResolveFortnight


1 package com.calipso.reportgenerator.common;
2
3
4 import java.util.Calendar JavaDoc;
5
6 /**
7  * Define el comportamiento para poder averiguar el valor de la quincena
8  */

9 public class ResolveFortnight extends DateExpressionResolver {
10   public ResolveFortnight() {
11     super();
12   }
13
14   /**
15    * * Devuelve la quincena de la fecha previamente seteada
16    * @return String
17    */

18   public String JavaDoc doGetValue() {
19     int value = getDateFormatter().getCalendar().get(Calendar.DATE) <= 15 ? 1 : 2;
20     return String.valueOf(value);
21   }
22 }
23
Popular Tags