You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(49) |
Sep
(134) |
Oct
(33) |
Nov
(18) |
Dec
(51) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(50) |
Feb
(32) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(9) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(1) |
Feb
(4) |
Mar
(8) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
(54) |
Apr
(21) |
May
(13) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ma...@us...> - 2006-09-11 12:32:09
|
Revision: 159
http://svn.sourceforge.net/objectlabkit/?rev=159&view=rev
Author: marchy
Date: 2006-09-11 05:32:00 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
plain eclipse project (in the root)
Modified Paths:
--------------
trunk/.project
Removed Paths:
-------------
trunk/.classpath
Deleted: trunk/.classpath
===================================================================
--- trunk/.classpath 2006-09-11 11:56:13 UTC (rev 158)
+++ trunk/.classpath 2006-09-11 12:32:00 UTC (rev 159)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry path="datecalc-common/src/main/java" output="datecalc-common/target/classes" kind="src"/>
- <classpathentry path="datecalc-common/src/test/java" output="datecalc-common/target/test-classes" kind="src"/>
- <classpathentry path="datecalc-jdk/src/main/java" output="datecalc-jdk/target/classes" kind="src"/>
- <classpathentry path="datecalc-jdk/src/test/java" output="datecalc-jdk/target/test-classes" kind="src"/>
- <classpathentry path="datecalc-joda/src/main/java" output="datecalc-joda/target/classes" kind="src"/>
- <classpathentry path="datecalc-joda/src/test/java" output="datecalc-joda/target/test-classes" kind="src"/>
- <classpathentry path="org.eclipse.jdt.launching.JRE_CONTAINER" kind="con"/>
- <classpathentry path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" kind="var"/>
- <classpathentry path="M2_REPO/joda-time/joda-time/1.3/joda-time-1.3.jar" kind="var"/>
- <classpathentry path="" kind="output"/>
-</classpath>
Modified: trunk/.project
===================================================================
--- trunk/.project 2006-09-11 11:56:13 UTC (rev 158)
+++ trunk/.project 2006-09-11 12:32:00 UTC (rev 159)
@@ -5,13 +5,7 @@
<projects>
</projects>
<buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-11 11:56:24
|
Revision: 158
http://svn.sourceforge.net/objectlabkit/?rev=158&view=rev
Author: benoitx
Date: 2006-09-11 04:56:13 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Better javadoc.
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractIMMDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -32,6 +32,9 @@
* @version $Revision$ $Date$
*
* @param <E>
+ * a representation of a date, typically JDK: Date, Calendar;
+ * Joda:LocalDate, YearMonthDay
+ *
*/
public abstract class AbstractDateCalculator<E> implements DateCalculator<E> {
private static final int MONTHS_IN_YEAR = 12;
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractIMMDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractIMMDateCalculator.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractIMMDateCalculator.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -30,6 +30,9 @@
* @version $Revision: 108 $ $Date: 2006-09-05 11:13:01 +0100 (Tue, 05 Sep 2006) $
*
* @param <E>
+ * a representation of a date, typically JDK: Date, Calendar;
+ * Joda:LocalDate, YearMonthDay
+ *
*/
public abstract class AbstractIMMDateCalculator<E> implements IMMDateCalculator<E> {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -22,12 +22,16 @@
import java.util.concurrent.ConcurrentMap;
/**
- * @TODO javadoc
+ * Base class for all calculator factories, it handles the holiday registration.
*
* @author Marcin Jekot
* @author $LastChangedBy: benoitx $
* @version $Revision: 125 $ $Date: 2006-09-07 19:24:20 +0200 (Thu, 07 Sep 2006) $
*
+ * @param <E>
+ * a representation of a date, typically JDK: Date, Calendar;
+ * Joda:LocalDate, YearMonthDay
+ *
*/
public abstract class AbstractKitCalculatorsFactory<E> implements KitCalculatorsFactory<E> {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -32,6 +32,11 @@
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
+ *
+ * @param <E>
+ * a representation of a date, typically JDK: Date, Calendar;
+ * Joda:LocalDate, YearMonthDay
+ *
*/
public interface DateCalculator<E> {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -26,6 +26,9 @@
* @version $Revision$ $Date$
*
* @param <E>
+ * a representation of a date, typically JDK: Date, Calendar;
+ * Joda:LocalDate, YearMonthDay
+ *
*/
public interface HolidayHandler<E> {
E moveCurrentDate(DateCalculator<E> date);
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/IMMDateCalculator.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -26,6 +26,10 @@
* @author Benoit Xhenseval
* @author $LastChangedBy: benoitx $
* @version $Revision: 109 $ $Date: 2006-09-05 12:16:39 +0100 (Tue, 05 Sep 2006) $
+ * @param <E>
+ * a representation of a date, typically JDK: Date, Calendar;
+ * Joda:LocalDate, YearMonthDay
+ *
*/
public interface IMMDateCalculator<E> {
/**
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/KitCalculatorsFactory.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -27,13 +27,14 @@
* NOT change even if a new set is registered; one needs to get a new
* DateCalculator to get the new set.
*
- * @param E
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy: benoitx $
+ * @version $Revision: 125 $ $Date: 2006-09-07 19:24:20 +0200 (Thu, 07 Sep 2006) $
+ *
+ * @param <E>
* a representation of a date, typically JDK: Date, Calendar;
* Joda:LocalDate, YearMonthDay
*
- * @author Benoit Xhenseval
- * @author $LastChangedBy: benoitx $
- * @version $Revision: 125 $ $Date: 2006-09-07 19:24:20 +0200 (Thu, 07 Sep 2006) $
*/
public interface KitCalculatorsFactory<E> {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -21,18 +21,16 @@
* Interface that defines a financial market way of calculating difference in
* days, month (or part of) and year (or part of).
*
- * @TODO Improve javadoc.
- *
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
*
* @param <E>
- * a representation of "Date", typically Date, Calendar, LocalDate,
- * YearMonthDay.
+ * a representation of a date, typically JDK: Date, Calendar;
+ * Joda:LocalDate, YearMonthDay
+ *
*/
public interface PeriodCountCalculator<E> {
-
int YEAR_360 = 360;
int MONTHS_IN_YEAR = 12;
@@ -45,9 +43,33 @@
int MONTH_30_DAYS = 30;
+ /**
+ * This calculates the number of days between 2 dates, it follows the given basis which means that
+ * the result could vary between the same 2 dates if the basis is different.
+ * @param start the start date
+ * @param end the end date
+ * @param basis the basis to use
+ * @return number of days between end and start.
+ */
int dayDiff(final E start, final E end, PeriodCountBasis basis);
+ /**
+ * This calculates the number of months (or fraction) between 2 dates, it follows the given basis which means that
+ * the result could vary between the same 2 dates if the basis is different.
+ * @param start the start date
+ * @param end the end date
+ * @param basis the basis to use
+ * @return number of months between end and start.
+ */
double monthDiff(final E start, final E end, PeriodCountBasis basis);
+ /**
+ * This calculates the number of years (or fraction) between 2 dates, it follows the given basis which means that
+ * the result could vary between the same 2 dates if the basis is different.
+ * @param start the start date
+ * @param end the end date
+ * @param basis the basis to use
+ * @return number of months between end and start.
+ */
double yearDiff(final E start, final E end, PeriodCountBasis basis);
}
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-11 11:17:54 UTC (rev 157)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-11 11:56:13 UTC (rev 158)
@@ -19,7 +19,7 @@
/**
* Holds only valid unit and TenorCode: Day, Week, Month, Year, IMM, Overnight,
- * TomNext, Spot, SpotNext, SpotWeek.
+ * Spot.
*
* @author Benoit Xhenseval
* @author $LastChangedBy$
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-11 11:17:58
|
Revision: 157
http://svn.sourceforge.net/objectlabkit/?rev=157&view=rev
Author: benoitx
Date: 2006-09-11 04:17:54 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Using Maven2, the jdk and joda tests depend on the common ones, I've added the dependency via a testResource.
Modified Paths:
--------------
trunk/datecalc-jdk/pom.xml
trunk/datecalc-joda/pom.xml
Modified: trunk/datecalc-jdk/pom.xml
===================================================================
--- trunk/datecalc-jdk/pom.xml 2006-09-11 09:23:35 UTC (rev 156)
+++ trunk/datecalc-jdk/pom.xml 2006-09-11 11:17:54 UTC (rev 157)
@@ -31,4 +31,17 @@
</dependency>
</dependencies>
+ <build>
+ <testResources>
+ <testResource>
+ <directory>
+ ../datecalc-common/target/test-classes
+ </directory>
+ <includes>
+ <include>**/*.class</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+
</project>
\ No newline at end of file
Modified: trunk/datecalc-joda/pom.xml
===================================================================
--- trunk/datecalc-joda/pom.xml 2006-09-11 09:23:35 UTC (rev 156)
+++ trunk/datecalc-joda/pom.xml 2006-09-11 11:17:54 UTC (rev 157)
@@ -1,34 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
- <artifactId>datecalc-joda</artifactId>
- <packaging>jar</packaging>
- <name>Date Calculator for Joda</name>
- <description>
- Date Calculator methods for Joda
- </description>
+ <artifactId>datecalc-joda</artifactId>
+ <packaging>jar</packaging>
+ <name>Date Calculator for Joda</name>
+ <description>Date Calculator methods for Joda</description>
- <dependencies>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>1.3</version>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <directory>
+ ../datecalc-common/target/test-classes
+ </directory>
+ <includes>
+ <include>**/*.class</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+
</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-11 09:24:23
|
Revision: 156
http://svn.sourceforge.net/objectlabkit/?rev=156&view=rev
Author: benoitx
Date: 2006-09-11 02:23:35 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Added more tests for Tenor.
Some .classpath etc where referencing non-existing directories.
Modified Paths:
--------------
trunk/.classpath
trunk/datecalc-common/.project
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarBackwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarForwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarKitCalculatorsFactory.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedFollowingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedPreceedingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarPeriodCountCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateBackwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/HolidayHandlerYearMonthDayWrapper.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/DateTimeExcelDateUtilTest.java
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/.classpath 2006-09-11 09:23:35 UTC (rev 156)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry output="datecalc-common/target/classes" kind="src" path="datecalc-common/src/main/java"/>
- <classpathentry output="datecalc-common/target/test-classes" kind="src" path="datecalc-common/src/test/java"/>
- <classpathentry output="datecalc-jdk/target/classes" kind="src" path="datecalc-jdk/src/main/java"/>
- <classpathentry output="datecalc-jdk/target/test-classes" kind="src" path="datecalc-jdk/src/test/java"/>
- <classpathentry output="datecalc-joda/target/classes" kind="src" path="datecalc-joda/src/main/java"/>
- <classpathentry output="datecalc-joda/target/test-classes" kind="src" path="datecalc-joda/src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/joda-time/joda-time/1.3/joda-time-1.3.jar"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry path="datecalc-common/src/main/java" output="datecalc-common/target/classes" kind="src"/>
+ <classpathentry path="datecalc-common/src/test/java" output="datecalc-common/target/test-classes" kind="src"/>
+ <classpathentry path="datecalc-jdk/src/main/java" output="datecalc-jdk/target/classes" kind="src"/>
+ <classpathentry path="datecalc-jdk/src/test/java" output="datecalc-jdk/target/test-classes" kind="src"/>
+ <classpathentry path="datecalc-joda/src/main/java" output="datecalc-joda/target/classes" kind="src"/>
+ <classpathentry path="datecalc-joda/src/test/java" output="datecalc-joda/target/test-classes" kind="src"/>
+ <classpathentry path="org.eclipse.jdt.launching.JRE_CONTAINER" kind="con"/>
+ <classpathentry path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" kind="var"/>
+ <classpathentry path="M2_REPO/joda-time/joda-time/1.3/joda-time-1.3.jar" kind="var"/>
+ <classpathentry path="" kind="output"/>
</classpath>
Modified: trunk/datecalc-common/.project
===================================================================
--- trunk/datecalc-common/.project 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/.project 2006-09-11 09:23:35 UTC (rev 156)
@@ -1,14 +1,17 @@
-<projectDescription>
- <name>datecalc-common</name>
- <comment>Common Date Calculator methods</comment>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments/>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>datecalc-common</name>
+ <comment>DateCalc Common library is the library used by both JDK and JODA libraries.</comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -34,6 +34,8 @@
* @param <E>
*/
public abstract class AbstractDateCalculator<E> implements DateCalculator<E> {
+ private static final int MONTHS_IN_YEAR = 12;
+
protected static final int DAYS_IN_WEEK = 7;
private String name;
@@ -115,30 +117,37 @@
moveByDays(daysToSpot);
}
int unit = tenor.getUnits();
- if (tenorCode==TenorCode.WEEK) {
+ if (tenorCode == TenorCode.WEEK) {
tenorCode = TenorCode.DAY;
- unit *= DAYS_IN_WEEK;
+ unit *= DAYS_IN_WEEK;
}
-
- if (tenorCode==TenorCode.YEAR) {
+
+ if (tenorCode == TenorCode.YEAR) {
tenorCode = TenorCode.MONTH;
- unit *= 12;
+ unit *= MONTHS_IN_YEAR;
}
+ DateCalculator<E> calc = this;
+
// move by tenor
switch (tenorCode) {
case OVERNIGHT:
- return moveByDays(1);
+ calc = moveByDays(1);
+ break;
case SPOT:
- return this;
+ calc = this;
+ break;
case DAY:
- return moveByDays(unit);
+ calc = moveByDays(unit);
+ break;
case MONTH:
- return moveByMonths(unit);
+ calc = moveByMonths(unit);
+ break;
default:
throw new UnsupportedOperationException("Sorry not yet...");
}
+ return calc;
}
protected abstract DateCalculator<E> moveByMonths(int months);
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -20,11 +20,11 @@
/**
* This will be called to determine whether the date should be moved according
* to the special algorithm used.
- *
+ *
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
- *
+ *
* @param <E>
*/
public interface HolidayHandler<E> {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -23,7 +23,7 @@
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
- *
+ *
*/
public final class HolidayHandlerType {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -17,7 +17,6 @@
*/
package net.objectlab.kit.datecalc.common;
-
/**
* Defines some standard Day Count basis.
*
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -19,7 +19,7 @@
/**
* Interface that defines a financial market way of calculating difference in
- * days, month (or part of) and year (or part of).
+ * days, month (or part of) and year (or part of).
*
* @TODO Improve javadoc.
*
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -23,7 +23,7 @@
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
- *
+ *
*/
public final class StandardTenor {
private StandardTenor() {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -20,11 +20,11 @@
/**
* Holds only valid unit and TenorCode: Day, Week, Month, Year, IMM, Overnight,
* TomNext, Spot, SpotNext, SpotWeek.
- *
+ *
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
- *
+ *
*/
public class Tenor {
private int units = 0;
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -19,16 +19,14 @@
/**
* enum of Tenor Codes held by a {@link Tenor}
- *
+ *
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
- *
+ *
*/
public enum TenorCode {
- OVERNIGHT("ON", false),
- SPOT("SP", false),
- DAY("D", true), WEEK("W", true), MONTH("M", true), YEAR("Y", true);
+ OVERNIGHT("ON", false), SPOT("SP", false), DAY("D", true), WEEK("W", true), MONTH("M", true), YEAR("Y", true);
private final String code;
@@ -47,8 +45,9 @@
}
/**
- * @param code string representation of the <code>TenorCode</code>
- * @return a <code>TenorCode</code> represented by the string argument
+ * @param code
+ * string representation of the <code>TenorCode</code>
+ * @return a <code>TenorCode</code> represented by the string argument
*/
public static TenorCode fromCode(final String code) {
for (final TenorCode ct : TenorCode.values()) {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -45,9 +45,11 @@
}
/**
- * Removes set's all "time" fields to zero, leaving only the date portion of the Calendar.
- * The Calendar passe
- * @param cal to Calendar object to blast, note, it will be modified
+ * Removes set's all "time" fields to zero, leaving only the date portion of
+ * the Calendar. The Calendar passe
+ *
+ * @param cal
+ * to Calendar object to blast, note, it will be modified
* @return the calendar object modified (same instance)
*/
public static Calendar blastTime(final Calendar cal) {
@@ -81,7 +83,7 @@
throw new IllegalArgumentException("\"" + dateStr + "\"" + " is an invalid date, the pattern is : " + DATE_PATTERN);
}
}
-
+
/**
*
* @param str
@@ -105,6 +107,7 @@
/**
* Get a Calendar object for a given Date representation
+ *
* @param date
* @return
*/
@@ -116,7 +119,7 @@
cal.setTime(date);
return blastTime(cal);
}
-
+
/**
* Converts a Set of Date objects to a Set of Calendar objects
*
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -26,7 +26,7 @@
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
- *
+ *
*/
public class WorkingWeek {
private static final byte MONDAY = 1;
@@ -91,7 +91,8 @@
* true if working day
* @param dayOfWeek
* e.g. Calendar.MONDAY, Calendar.TUESDAY, etc
- * @return a new instance of a <code>WorkingWeek</code> with the working day set
+ * @return a new instance of a <code>WorkingWeek</code> with the working
+ * day set
*/
public WorkingWeek withWorkingDayFromCalendar(final boolean working, final int dayOfWeek) {
final int day = adjustDay(dayOfWeek);
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -212,24 +212,78 @@
checkMoveByTenor("2006-09-26", new Tenor(4, TenorCode.DAY), 0, "2006-09-29", HolidayHandlerType.BACKWARD);
}
+ public void testMoveByTenorDaysOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 1, "2006-08-10", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 1, "2006-08-11", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorDaysTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 2, "2006-08-11", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 2, "2006-08-11", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 2, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 2, "2006-08-18", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 2, "2006-08-22", HolidayHandlerType.BACKWARD);
+ }
+
public void testMoveByTenorWeek() {
checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.BACKWARD);
}
+ public void testMoveByTenorWeekOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 1, "2006-08-16", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 1, "2006-08-23", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 1, "2006-09-06", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorWeekTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 2, "2006-08-17", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 2, "2006-08-24", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 2, "2006-09-07", HolidayHandlerType.BACKWARD);
+ }
+
public void testMoveByTenorMonth() {
checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 0, "2006-09-29", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.BACKWARD);
-
+
checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-06", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 0, "2007-01-08", HolidayHandlerType.BACKWARD);
}
+ public void testMoveByTenorMonthOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 1, "2006-09-29", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 1, "2006-11-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 1, "2006-03-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 1, "2008-02-29", HolidayHandlerType.BACKWARD);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 1, "2006-09-08", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 1, "2006-09-08", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 1, "2006-10-09", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 1, "2007-01-09", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorMonthTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 2, "2006-09-29", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 2, "2006-11-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 2, "2006-03-02", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 2, "2008-02-29", HolidayHandlerType.BACKWARD);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 2, "2006-09-08", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 2, "2006-10-10", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 2, "2007-01-10", HolidayHandlerType.BACKWARD);
+ }
+
public void testMoveByTenorYear() {
checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 0, "2007-08-31", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 0, "2008-08-29", HolidayHandlerType.BACKWARD);
@@ -237,15 +291,54 @@
checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 0, "2012-02-29", HolidayHandlerType.BACKWARD);
}
+ public void testMoveByTenorYearOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 1, "2007-08-31", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 1, "2008-09-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 1, "2009-02-27", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 1, "2012-02-29", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorYearTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 2, "2007-08-31", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 2, "2008-09-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 2, "2009-02-27", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 2, "2012-02-29", HolidayHandlerType.BACKWARD);
+ }
+
public void testMoveByTenorSpot() {
checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 0, "2006-08-31", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
}
+ public void testMoveByTenorSpotOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 1, "2006-09-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 1, "2006-08-25", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorSpotTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 2, "2006-09-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 2, "2006-08-25", HolidayHandlerType.BACKWARD);
+ }
+
public void testMoveByTenorOvernight() {
checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 0, "2006-09-01", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
}
+
+ public void testMoveByTenorOvernightOneDayToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 1, "2006-09-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorOvernightTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 2, "2006-09-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.BACKWARD);
+ }
+
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -203,21 +203,21 @@
}
public void testMoveByTenorDaysOneDayToSpot() {
- checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 1, "2006-08-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 1, "2006-08-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 1, "2006-08-10", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 1, "2006-08-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorDaysTwoDaysToSpot() {
- checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 2, "2006-08-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 2, "2006-08-14", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 2, "2006-08-22", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 2, "2006-08-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 2, "2006-08-14", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 2, "2006-08-22", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorWeek() {
@@ -227,15 +227,15 @@
}
public void testMoveByTenorWeekOneDayToSpot() {
- checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 1, "2006-08-16", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 1, "2006-08-23", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 1, "2006-09-06", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 1, "2006-08-16", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 1, "2006-08-23", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 1, "2006-09-06", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorWeekTwoDaysToSpot() {
- checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 2, "2006-08-17", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 2, "2006-08-24", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 2, "2006-09-07", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 2, "2006-08-17", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 2, "2006-08-24", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 2, "2006-09-07", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorMonth() {
@@ -243,7 +243,7 @@
checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.FORWARD);
checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.FORWARD);
checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.FORWARD);
-
+
checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.FORWARD);
checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-11", HolidayHandlerType.FORWARD);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-09", HolidayHandlerType.FORWARD);
@@ -251,27 +251,27 @@
}
public void testMoveByTenorMonthOneDayToSpot() {
- checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 1, "2006-10-02", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 1, "2006-11-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 1, "2006-03-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 1, "2008-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
-
- checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 1, "2006-10-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 1, "2007-01-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 1, "2006-10-02", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 1, "2006-11-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 1, "2006-03-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 1, "2008-03-03", HolidayHandlerType.FORWARD);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 1, "2006-10-09", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 1, "2007-01-09", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorMonthTwoDaysToSpot() {
- checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 2, "2006-10-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 2, "2006-11-06", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 2, "2006-03-02", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 2, "2008-03-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
-
- checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 2, "2006-10-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 2, "2007-01-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 2, "2006-10-04", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 2, "2006-11-06", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 2, "2006-03-02", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 2, "2008-03-04", HolidayHandlerType.FORWARD);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 2, "2006-10-10", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 2, "2007-01-10", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorYear() {
@@ -281,19 +281,18 @@
checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 0, "2012-02-29", HolidayHandlerType.FORWARD);
}
-
public void testMoveByTenorYearOneDayToSpot() {
- checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 1, "2007-09-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 1, "2008-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 1, "2009-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 1, "2012-03-05", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 1, "2007-09-03", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 1, "2008-09-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 1, "2009-03-03", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 1, "2012-03-05", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorYearTwoDaysToSpot() {
- checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 2, "2007-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 2, "2008-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 2, "2009-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 2, "2012-03-05", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 2, "2007-09-04", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 2, "2008-09-04", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 2, "2009-03-03", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 2, "2012-03-05", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorSpot() {
@@ -302,13 +301,13 @@
}
public void testMoveByTenorSpotOneDayToSpot() {
- checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 1, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 1, "2006-09-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 1, "2006-08-30", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorSpotTwoDaysToSpot() {
- checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 2, "2006-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 2, "2006-08-31", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 2, "2006-09-04", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 2, "2006-08-31", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorOvernight() {
@@ -319,17 +318,17 @@
}
public void testMoveByTenorOvernightOneDayToSpot() {
- checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 1, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 1, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 1, "2006-08-29", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 1, "2006-09-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 1, "2006-08-30", HolidayHandlerType.FORWARD);
}
public void testMoveByTenorOvernightTwoDaysToSpot() {
- checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 2, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 2, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
- checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 2, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 2, "2006-08-29", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 2, "2006-09-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 2, "2006-08-30", HolidayHandlerType.FORWARD);
}
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -213,7 +213,7 @@
checkDate("do NOT move to next month", cal, "2006-07-28");
}
-
+
public void testMoveByTenorDays() {
checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
@@ -265,7 +265,7 @@
checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
-
+
checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
@@ -277,7 +277,7 @@
checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 1, "2006-11-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 1, "2006-03-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 1, "2008-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
-
+
checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 1, "2006-10-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
@@ -289,7 +289,7 @@
checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 2, "2006-11-06", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 2, "2006-03-02", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 2, "2008-03-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
-
+
checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 2, "2006-10-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -205,7 +205,6 @@
}
-
public void testAddAcrossMonth() {
final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_PRECEEDING);
@@ -237,25 +236,78 @@
checkMoveByTenor("2006-09-26", new Tenor(4, TenorCode.DAY), 0, "2006-09-29", HolidayHandlerType.MODIFIED_PRECEEDING);
}
+ public void testMoveByTenorDaysOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 1, "2006-08-10", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 1, "2006-08-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.FORWARD);
+ }
+
+ public void testMoveByTenorDaysTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 2, "2006-08-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 2, "2006-08-14", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 2, "2006-08-22", HolidayHandlerType.FORWARD);
+ }
+
public void testMoveByTenorWeek() {
checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.MODIFIED_PRECEEDING);
}
+ public void testMoveByTenorWeekOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 1, "2006-08-16", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 1, "2006-08-23", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 1, "2006-09-06", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+ public void testMoveByTenorWeekTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 2, "2006-08-17", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 2, "2006-08-24", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 2, "2006-09-07", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
public void testMoveByTenorMonth() {
checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 0, "2006-09-29", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.MODIFIED_PRECEEDING);
-
+
checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-06", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 0, "2007-01-08", HolidayHandlerType.MODIFIED_PRECEEDING);
}
+ public void testMoveByTenorMonthOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 1, "2006-10-02", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 1, "2006-11-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 1, "2006-03-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 1, "2008-03-03", HolidayHandlerType.MODIFIED_PRECEEDING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 1, "2006-09-08", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 1, "2006-09-08", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 1, "2006-10-09", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 1, "2007-01-09", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorMonthTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 2, "2006-10-02", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 2, "2006-11-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 2, "2006-03-02", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 2, "2008-03-03", HolidayHandlerType.MODIFIED_PRECEEDING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 2, "2006-09-08", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 2, "2006-10-10", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 2, "2007-01-10", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
public void testMoveByTenorYear() {
checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 0, "2007-08-31", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 0, "2008-08-29", HolidayHandlerType.MODIFIED_PRECEEDING);
@@ -263,15 +315,53 @@
checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 0, "2012-02-29", HolidayHandlerType.MODIFIED_PRECEEDING);
}
+ public void testMoveByTenorYearOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 1, "2007-09-03", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 1, "2008-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 1, "2009-03-03", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 1, "2012-03-02", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorYearTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 2, "2007-09-03", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 2, "2008-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 2, "2009-03-03", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 2, "2012-03-02", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
public void testMoveByTenorSpot() {
checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 0, "2006-08-31", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
}
+ public void testMoveByTenorSpotOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 1, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorSpotTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 2, "2006-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 2, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
public void testMoveByTenorOvernight() {
checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 0, "2006-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
}
+
+ public void testMoveByTenorOvernightOneDayToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorOvernightTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 2, "2006-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java 2006-09-10 20:38:22 UTC (rev 155)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java 2006-09-11 09:23:35 UTC (rev 156)
@@ -122,67 +122,67 @@
{ "30Y", "1998-12-31", "2028-12-29", "ACT_360", "10956", "30.433333" }
// end of set
};
-
-// private static final String[][] ACT_ACT = {
-// { "my testies", "2006-08-08", "2006-11-08", "ACT_ACT", "92", "0" },
-// };
-
+
+ // private static final String[][] ACT_ACT = {
+ // { "my testies", "2006-08-08", "2006-11-08", "ACT_ACT", "92", "0" },
+ // };
+
private static final String[][] ACT_ACT = {
- // name start end period dayDiff yearDiff
- { "0D", "2006-08-08", "2006-08-08", "ACT_ACT", "0", "0.00" },
- { "1D", "2006-08-08", "2006-08-09", "ACT_ACT", "1", "0.00" },
- { "1W", "2006-08-08", "2006-08-15", "ACT_ACT", "7", "0.00" },
- { "1M", "2006-08-08", "2006-09-08", "ACT_ACT", "31", "0.00" },
- { "3M", "2006-08-08", "2006-11-08", "ACT_ACT", "92", "0.00" },
- { "6M", "2006-08-08", "2007-02-08", "ACT_ACT", "184", "0.504110" },
- { "9M", "2006-08-08", "2007-05-08", "ACT_ACT", "273", "0.747945" },
- { "1Y", "2006-08-08", "2007-08-08", "ACT_ACT", "365", "1.000000" },
- { "2Y", "2006-08-08", "2008-08-08", "ACT_ACT", "731", "2.001093" },
- { "3Y", "2006-08-08", "2009-08-10", "ACT_ACT", "1098", "3.005479" },
- { "4Y", "2006-08-08", "2010-08-09", "ACT_ACT", "1462", "4.002740" },
- { "5Y", "2006-08-08", "2011-08-08", "ACT_ACT", "1826", "5.00" },
- { "7Y", "2006-08-08", "2013-08-08", "ACT_ACT", "2557", "7.00" },
- { "10Y", "2006-08-08", "2016-08-08", "ACT_ACT", "3653", "10.001093" },
- { "15Y", "2006-08-08", "2021-08-09", "ACT_ACT", "5480", "15.002740" },
- { "20Y", "2006-08-08", "2026-08-10", "ACT_ACT", "7307", "20.005479" },
- { "30Y", "2006-08-08", "2036-08-08", "ACT_ACT", "10958", "30.001093" },
- // leap year - funny date...
- { "0D", "2008-02-29", "2008-02-29", "ACT_ACT", "0", "0.00" },
- { "1D", "2008-02-29", "2008-03-03", "ACT_ACT", "3", "0.00" },
- { "1W", "2008-02-29", "2008-03-07", "ACT_ACT", "7", "0.00" },
- { "1M", "2008-02-29", "2008-03-31", "ACT_ACT", "31", "0.00" },
- { "3M", "2008-02-29", "2008-05-29", "ACT_ACT", "90", "0.00" },
- { "6M", "2008-02-29", "2008-08-29", "ACT_ACT", "182", "0.00" },
- { "9M", "2008-02-29", "2008-11-28", "ACT_ACT", "273", "0.00" },
- { "1Y", "2008-02-29", "2009-02-27", "ACT_ACT", "364", "0.994962" },
- { "2Y", "2008-02-29", "2010-02-26", "ACT_ACT", "728", "1.992222" },
- { "3Y", "2008-02-29", "2011-02-28", "ACT_ACT", "1095", "2.997702" },
- { "4Y", "2008-02-29", "2012-02-29", "ACT_ACT", "1461", "4.00" },
- { "5Y", "2008-02-29", "2013-02-28", "ACT_ACT", "1826", "4.997702" },
- { "7Y", "2008-02-29", "2015-02-27", "ACT_ACT", "2555", "6.994962" },
- { "10Y", "2008-02-29", "2018-02-28", "ACT_ACT", "3652", "9.997702" },
- { "15Y", "2008-02-29", "2023-02-28", "ACT_ACT", "5478", "14.997702" },
- { "20Y", "2008-02-29", "2028-02-29", "ACT_ACT", "7305", "20.00" },
- { "30Y", "2008-02-29", "2038-02...
[truncated message content] |
|
From: <ma...@us...> - 2006-09-10 20:38:45
|
Revision: 155
http://svn.sourceforge.net/objectlabkit/?rev=155&view=rev
Author: marchy
Date: 2006-09-10 13:38:22 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
some more fiddling with m2 pom's
Modified Paths:
--------------
trunk/datecalc-common/pom.xml
trunk/datecalc-jdk/pom.xml
trunk/datecalc-joda/pom.xml
trunk/pom.xml
Modified: trunk/datecalc-common/pom.xml
===================================================================
--- trunk/datecalc-common/pom.xml 2006-09-10 16:44:22 UTC (rev 154)
+++ trunk/datecalc-common/pom.xml 2006-09-10 20:38:22 UTC (rev 155)
@@ -1,36 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- /*
- * ========================================================================
- * ObjectLab Financial Ltd, proud sponsor of The Kit.
- * ========================================================================
- */
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>datecalc-common</artifactId>
- <packaging>jar</packaging>
- <name>DateCalc commons</name>
- <description>Common Date Calculator methods</description>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ /*
+ * ========================================================================
+ * ObjectLab Financial Ltd, proud sponsor of The Kit.
+ * ========================================================================
+ */
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>datecalc-common</artifactId>
+ <packaging>jar</packaging>
+ <name>DateCalc commons</name>
+ <description>Common Date Calculator methods</description>
+
</project>
\ No newline at end of file
Modified: trunk/datecalc-jdk/pom.xml
===================================================================
--- trunk/datecalc-jdk/pom.xml 2006-09-10 16:44:22 UTC (rev 154)
+++ trunk/datecalc-jdk/pom.xml 2006-09-10 20:38:22 UTC (rev 155)
@@ -1,43 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- /*
- * ========================================================================
- * ObjectLab Financial Ltd, proud sponsor of The Kit.
- * ========================================================================
- */
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>datecalc-jdk</artifactId>
- <packaging>jar</packaging>
- <name>Date Calculator for JDK</name>
- <description>Date Calculator methods for JDK</description>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
- <dependencies>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ /*
+ * ========================================================================
+ * ObjectLab Financial Ltd, proud sponsor of The Kit.
+ * ========================================================================
+ */
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>datecalc-jdk</artifactId>
+ <packaging>jar</packaging>
+ <name>Date Calculator for JDK</name>
+ <description>Date Calculator methods for JDK</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+
</project>
\ No newline at end of file
Modified: trunk/datecalc-joda/pom.xml
===================================================================
--- trunk/datecalc-joda/pom.xml 2006-09-10 16:44:22 UTC (rev 154)
+++ trunk/datecalc-joda/pom.xml 2006-09-10 20:38:22 UTC (rev 155)
@@ -1,43 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>datecalc-joda</artifactId>
- <packaging>jar</packaging>
- <name>Date Calculator for Joda</name>
- <description>
- Date Calculator methods for Joda
- </description>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
- <dependencies>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
-
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>1.3</version>
- </dependency>
- </dependencies>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>datecalc-joda</artifactId>
+ <packaging>jar</packaging>
+ <name>Date Calculator for Joda</name>
+ <description>
+ Date Calculator methods for Joda
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.3</version>
+ </dependency>
+ </dependencies>
+
</project>
\ No newline at end of file
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2006-09-10 16:44:22 UTC (rev 154)
+++ trunk/pom.xml 2006-09-10 20:38:22 UTC (rev 155)
@@ -1,65 +1,89 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc</artifactId>
- <packaging>pom</packaging>
- <name>ObjectLab Kit</name>
- <version>1.0-SNAPSHOT</version>
- <description>
- ObjectLab Kit provides a generic Business Calendar for calculating dates given set(s) of holidays.
- Why re-inventing the wheel???
- </description>
-
- <modules>
- <module>datecalc-common</module>
- <module>datecalc-jdk</module>
- <module>datecalc-joda</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-common</artifactId>
- <version>${pom.version}</version>
- </dependency>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-jdk</artifactId>
- <version>${pom.version}</version>
- </dependency>
- <dependency>
- <groupId>net.objectlab.kit.datecalc</groupId>
- <artifactId>datecalc-joda</artifactId>
- <version>${pom.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc</artifactId>
+ <packaging>pom</packaging>
+ <name>ObjectLab Kit</name>
+ <version>1.0-SNAPSHOT</version>
+ <description>
+ ObjectLab Kit provides a generic Business Calendar for calculating dates given set(s) of holidays. Why
+ re-inventing the wheel???
+ </description>
+
+ <modules>
+ <module>datecalc-common</module>
+ <module>datecalc-jdk</module>
+ <module>datecalc-joda</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!--
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-jdk</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.objectlab.kit.datecalc</groupId>
+ <artifactId>datecalc-joda</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ -->
+
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-10 16:44:32
|
Revision: 154
http://svn.sourceforge.net/objectlabkit/?rev=154&view=rev
Author: benoitx
Date: 2006-09-10 09:44:22 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
Tidy
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 16:26:07 UTC (rev 153)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 16:44:22 UTC (rev 154)
@@ -27,10 +27,7 @@
*/
public enum TenorCode {
OVERNIGHT("ON", false),
- // TOMNEXT("TN", false),
SPOT("SP", false),
- // SPOTNEXT("SN", false),
- // SPOTWEEK("SW", false),
DAY("D", true), WEEK("W", true), MONTH("M", true), YEAR("Y", true);
private final String code;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 16:26:18
|
Revision: 153
http://svn.sourceforge.net/objectlabkit/?rev=153&view=rev
Author: marchy
Date: 2006-09-10 09:26:07 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java 2006-09-10 16:18:07 UTC (rev 152)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountCalculator.java 2006-09-10 16:26:07 UTC (rev 153)
@@ -19,8 +19,10 @@
/**
* Interface that defines a financial market way of calculating difference in
- * days, month (or part of) and year (or part of). TODO Improve javadoc.
+ * days, month (or part of) and year (or part of).
*
+ * @TODO Improve javadoc.
+ *
* @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-10 16:18:07 UTC (rev 152)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-10 16:26:07 UTC (rev 153)
@@ -91,7 +91,7 @@
* true if working day
* @param dayOfWeek
* e.g. Calendar.MONDAY, Calendar.TUESDAY, etc
- * @return TODO
+ * @return a new instance of a <code>WorkingWeek</code> with the working day set
*/
public WorkingWeek withWorkingDayFromCalendar(final boolean working, final int dayOfWeek) {
final int day = adjustDay(dayOfWeek);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-10 16:19:03
|
Revision: 152
http://svn.sourceforge.net/objectlabkit/?rev=152&view=rev
Author: benoitx
Date: 2006-09-10 09:18:07 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
add the cast again...
Modified Paths:
--------------
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 16:00:47 UTC (rev 151)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 16:18:07 UTC (rev 152)
@@ -98,8 +98,8 @@
final int diff1 = new Period(start, endOfStartYear, PeriodType.days()).getDays();
final int diff2 = new Period(startOfEndYear, end, PeriodType.days()).getDays();
- diff = ((diff1 + 1.0)) / start.dayOfYear().getMaximumValue()
- + ((endYear - startYear - 1.0)) + ((double) (diff2)) / (double) end.dayOfYear().getMaximumValue();
+ diff = ((double) (diff1 + 1.0)) / (double) start.dayOfYear().getMaximumValue()
+ + ((double) (endYear - startYear - 1.0)) + ((double) (diff2)) / (double) end.dayOfYear().getMaximumValue();
}
} else if (basis == PeriodCountBasis.CONV_30_360 || basis == PeriodCountBasis.CONV_360E_ISDA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 16:01:26
|
Revision: 151
http://svn.sourceforge.net/objectlabkit/?rev=151&view=rev
Author: marchy
Date: 2006-09-10 09:00:47 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
javadoc update. still need to check if the {@link xx} elements work properly, but I doubt it, i think i need to make them fully qualified java names
Modified Paths:
--------------
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/HolidayHandlerYearMonthDayWrapper.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/HolidayHandlerYearMonthDayWrapper.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/HolidayHandlerYearMonthDayWrapper.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/HolidayHandlerYearMonthDayWrapper.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -24,8 +24,10 @@
import org.joda.time.YearMonthDay;
/**
- *
- * @author xhensevb
+ * A Wrapper to handle any HolidayHandler<LocalDate> types via a HolidayHandler<YearMonthDay>
+ * delegate
+ *
+ * @author Benoit Xhenseval
* @author $LastChangedBy$
* @version $Revision$ $Date$
*
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -22,9 +22,12 @@
import org.joda.time.LocalDate;
/**
- * Immutable class representing a WorkingWeek.
+ * Immutable class representing a WorkingWeek for the Joda implementation.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class JodaWorkingWeek extends WorkingWeek {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -27,6 +27,9 @@
* day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class LocalDateBackwardHandler extends LocalDateForwardHandler {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -33,6 +33,9 @@
* will NOT move a date, even if it falls on a holiday or weekend.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class LocalDateCalculator extends AbstractDateCalculator<LocalDate> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -28,6 +28,9 @@
* day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class LocalDateForwardHandler implements HolidayHandler<LocalDate> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -26,6 +26,14 @@
import org.joda.time.DateTimeConstants;
import org.joda.time.LocalDate;
+/**
+ * Joda <code>LocalDate</code> based implementation of the {@link IMMDateCalculator}
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class LocalDateIMMDateCalculator extends AbstractIMMDateCalculator<LocalDate> {
protected static final int MONTHS_IN_QUARTER = 3;
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -24,6 +24,14 @@
import org.joda.time.LocalDate;
+/**
+ * The default factory for getting Joda <code>LocalDate</code> based calculators.
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class LocalDateKitCalculatorsFactory extends AbstractKitCalculatorsFactory<LocalDate> {
private static final LocalDateKitCalculatorsFactory DEFAULT = new LocalDateKitCalculatorsFactory();
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -29,6 +29,9 @@
* moving backward until it finds a working day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class LocalDateModifiedFollowingHandler implements HolidayHandler<LocalDate> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -28,6 +28,9 @@
* to moving forward until it finds a working day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class LocalDateModifiedPreceedingHandler extends LocalDateModifiedFollowingHandler {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -24,6 +24,14 @@
import org.joda.time.Period;
import org.joda.time.PeriodType;
+/**
+ * Joda <code>LocalDatePeriod</code> based implementation of the {@link PeriodCountCalculator}
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class LocalDatePeriodCountCalculator implements PeriodCountCalculator<LocalDate> {
public int dayDiff(final LocalDate start, final LocalDate end, final PeriodCountBasis basis) {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -28,6 +28,9 @@
* day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class YearMonthDayBackwardHandler implements HolidayHandler<YearMonthDay> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -35,6 +35,9 @@
* will NOT move a date, even if it falls on a holiday or weekend.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class YearMonthDayDateCalculator extends AbstractDateCalculator<YearMonthDay> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -28,6 +28,9 @@
* day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class YearMonthDayForwardHandler implements HolidayHandler<YearMonthDay> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -26,6 +26,14 @@
import org.joda.time.LocalDate;
import org.joda.time.YearMonthDay;
+/**
+ * Joda <code>YearMonthDay</code> based implementation of the {@link IMMDateCalculator}
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class YearMonthDayIMMDateCalculator extends AbstractIMMDateCalculator<YearMonthDay> {
private static final LocalDateIMMDateCalculator DELEGATE = new LocalDateIMMDateCalculator();
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -26,6 +26,14 @@
import org.joda.time.YearMonthDay;
+/**
+ * The default factory for getting Joda <code>YearMonthDay</code> based calculators.
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class YearMonthDayKitCalculatorsFactory extends AbstractKitCalculatorsFactory<YearMonthDay> {
private static final KitCalculatorsFactory<YearMonthDay> DEFAULT = new YearMonthDayKitCalculatorsFactory();
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -29,6 +29,9 @@
* moving backward until it finds a working day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class YearMonthDayModifiedFollowingHandler implements HolidayHandler<YearMonthDay> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -29,6 +29,9 @@
* to moving forward until it finds a working day.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class YearMonthDayModifiedPreceedingHandler implements HolidayHandler<YearMonthDay> {
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java 2006-09-10 16:00:47 UTC (rev 151)
@@ -22,6 +22,15 @@
import org.joda.time.YearMonthDay;
+/**
+ * Joda <code>YearMonthDay</code> based implementation of the {@link PeriodCountCalculator}.
+ * It just delegates to a <code>PeriodCountCalculator<LocalDate></code>
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class YearMonthDayPeriodCountCalculator implements PeriodCountCalculator<YearMonthDay> {
private static final LocalDatePeriodCountCalculator DELEGATE = new LocalDatePeriodCountCalculator();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-10 15:49:54
|
Revision: 150
http://svn.sourceforge.net/objectlabkit/?rev=150&view=rev
Author: benoitx
Date: 2006-09-10 08:49:08 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
Added more tests for the Tenor code.
Plus implementation for JODA.
There is NO implementation for JDK and yes, you need to do it, thanks! :-)
More tests to follow for backward and modified preceeding.
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/DateTimeExcelDateUtilTest.java
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -67,8 +67,6 @@
return startDate;
}
- protected abstract E getToday();
-
/** Set both start date and current date */
public void setStartDate(final E startDate) {
this.startDate = startDate;
@@ -111,11 +109,21 @@
throw new IllegalArgumentException("Tenor cannot be null");
}
- final TenorCode tenorCode = tenor.getCode();
+ TenorCode tenorCode = tenor.getCode();
if (tenorCode != TenorCode.OVERNIGHT) {
// get to the Spot date first:
moveByDays(daysToSpot);
}
+ int unit = tenor.getUnits();
+ if (tenorCode==TenorCode.WEEK) {
+ tenorCode = TenorCode.DAY;
+ unit *= DAYS_IN_WEEK;
+ }
+
+ if (tenorCode==TenorCode.YEAR) {
+ tenorCode = TenorCode.MONTH;
+ unit *= 12;
+ }
// move by tenor
switch (tenorCode) {
@@ -124,15 +132,17 @@
case SPOT:
return this;
case DAY:
- return moveByDays(tenor.getUnits());
- case WEEK:
- return moveByDays(tenor.getUnits() * DAYS_IN_WEEK);
+ return moveByDays(unit);
+ case MONTH:
+ return moveByMonths(unit);
default:
throw new UnsupportedOperationException("Sorry not yet...");
}
}
+ protected abstract DateCalculator<E> moveByMonths(int months);
+
public void setHolidayHandler(final HolidayHandler<E> holidayHandler) {
this.holidayHandler = holidayHandler;
}
@@ -228,6 +238,8 @@
return cal;
}
+ protected abstract E getToday();
+
protected abstract DateCalculator<E> createNewCalculator(String calcName, E theStartDate, Set<E> holidays,
HolidayHandler<E> handler);
}
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -39,13 +39,13 @@
public static final Tenor T_1M = new Tenor(1, TenorCode.MONTH);
- public static final Tenor T_2M = new Tenor(1, TenorCode.MONTH);
+ public static final Tenor T_2M = new Tenor(2, TenorCode.MONTH);
- public static final Tenor T_3M = new Tenor(1, TenorCode.MONTH);
+ public static final Tenor T_3M = new Tenor(3, TenorCode.MONTH);
- public static final Tenor T_6M = new Tenor(1, TenorCode.MONTH);
+ public static final Tenor T_6M = new Tenor(6, TenorCode.MONTH);
- public static final Tenor T_9M = new Tenor(1, TenorCode.MONTH);
+ public static final Tenor T_9M = new Tenor(9, TenorCode.MONTH);
public static final Tenor T_1Y = new Tenor(1, TenorCode.YEAR);
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractBackwardDateCalculatorTest.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -209,6 +209,7 @@
checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-09-26", new Tenor(4, TenorCode.DAY), 0, "2006-09-29", HolidayHandlerType.BACKWARD);
}
public void testMoveByTenorWeek() {
@@ -216,4 +217,35 @@
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.BACKWARD);
checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.BACKWARD);
}
+
+ public void testMoveByTenorMonth() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 0, "2006-09-29", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.BACKWARD);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-06", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 0, "2007-01-08", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorYear() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 0, "2007-08-31", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 0, "2008-08-29", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 0, "2009-02-27", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 0, "2012-02-29", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 0, "2006-08-31", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
+ }
+
+ public void testMoveByTenorOvernight() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 0, "2006-09-01", HolidayHandlerType.BACKWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.BACKWARD);
+ }
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractForwardDateCalculatorTest.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -199,11 +199,137 @@
checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.FORWARD);
checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.FORWARD);
checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-09-26", new Tenor(4, TenorCode.DAY), 0, "2006-10-02", HolidayHandlerType.FORWARD);
}
+ public void testMoveByTenorDaysOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 1, "2006-08-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 1, "2006-08-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 1, "2006-08-18", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 1, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorDaysTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 2, "2006-08-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 2, "2006-08-14", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(10, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(11, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(12, TenorCode.DAY), 2, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-07", new Tenor(13, TenorCode.DAY), 2, "2006-08-22", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
public void testMoveByTenorWeek() {
checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.FORWARD);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.FORWARD);
checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.FORWARD);
}
+
+ public void testMoveByTenorWeekOneDayToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 1, "2006-08-16", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 1, "2006-08-23", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 1, "2006-09-06", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorWeekTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 2, "2006-08-17", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 2, "2006-08-24", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 2, "2006-09-07", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorMonth() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 0, "2006-10-02", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.FORWARD);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-11", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-09", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 0, "2007-01-08", HolidayHandlerType.FORWARD);
+ }
+
+ public void testMoveByTenorMonthOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 1, "2006-10-02", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 1, "2006-11-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 1, "2006-03-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 1, "2008-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 1, "2006-10-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 1, "2007-01-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorMonthTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 2, "2006-10-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 2, "2006-11-06", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 2, "2006-03-02", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 2, "2008-03-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 2, "2006-10-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 2, "2007-01-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorYear() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 0, "2007-08-31", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 0, "2008-09-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 0, "2009-03-02", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 0, "2012-02-29", HolidayHandlerType.FORWARD);
+ }
+
+
+ public void testMoveByTenorYearOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 1, "2007-09-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 1, "2008-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 1, "2009-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 1, "2012-03-05", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorYearTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 2, "2007-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 2, "2008-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 2, "2009-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 2, "2012-03-05", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 0, "2006-08-31", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 0, "2006-08-29", HolidayHandlerType.FORWARD);
+ }
+
+ public void testMoveByTenorSpotOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 1, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorSpotTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 2, "2006-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 2, "2006-08-31", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorOvernight() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 0, "2006-08-29", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 0, "2006-09-01", HolidayHandlerType.FORWARD);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 0, "2006-08-30", HolidayHandlerType.FORWARD);
+ }
+
+ public void testMoveByTenorOvernightOneDayToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 1, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 1, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorOvernightTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 2, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 2, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 2, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedFollowingDateCalculatorTest.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -193,6 +193,27 @@
}
+ public void testAddAcrossMonth() {
+ final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_FOLLLOWING);
+
+ cal.setStartDate(newDate("2006-07-28"));
+ cal.moveByDays(1);
+ checkDate("31/7", cal, "2006-07-31");
+
+ cal.moveByDays(1);
+ checkDate("do move to next month", cal, "2006-08-01");
+
+ // now if it due to roll over:
+ cal.setStartDate(newDate("2006-07-28"));
+ final Set<E> holidays = newHolidaysSet();
+ holidays.clear();
+ holidays.add(newDate("2006-07-31"));
+ cal.setNonWorkingDays(holidays);
+ cal.moveByDays(1);
+
+ checkDate("do NOT move to next month", cal, "2006-07-28");
+ }
+
public void testMoveByTenorDays() {
checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
@@ -200,6 +221,7 @@
checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-09-26", new Tenor(4, TenorCode.DAY), 0, "2006-09-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
}
public void testMoveByTenorDaysOneDayToSpot() {
@@ -238,24 +260,96 @@
checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 2, "2006-09-07", HolidayHandlerType.MODIFIED_FOLLLOWING);
}
- public void testAddAcrossMonth() {
- final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ public void testMoveByTenorMonth() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 0, "2006-09-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 0, "2007-01-08", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- cal.setStartDate(newDate("2006-07-28"));
- cal.moveByDays(1);
- checkDate("31/7", cal, "2006-07-31");
+ public void testMoveByTenorMonthOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 1, "2006-10-02", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 1, "2006-11-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 1, "2006-03-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 1, "2008-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 1, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 1, "2006-10-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 1, "2007-01-09", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- cal.moveByDays(1);
- checkDate("do move to next month", cal, "2006-08-01");
+ public void testMoveByTenorMonthTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 2, "2006-10-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 2, "2006-11-06", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 2, "2006-03-02", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 2, "2008-03-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 2, "2006-09-11", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 2, "2006-10-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 2, "2007-01-10", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- // now if it due to roll over:
- cal.setStartDate(newDate("2006-07-28"));
- final Set<E> holidays = newHolidaysSet();
- holidays.clear();
- holidays.add(newDate("2006-07-31"));
- cal.setNonWorkingDays(holidays);
- cal.moveByDays(1);
+ public void testMoveByTenorYear() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 0, "2007-08-31", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 0, "2008-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 0, "2009-02-27", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 0, "2012-02-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
- checkDate("do NOT move to next month", cal, "2006-07-28");
+ public void testMoveByTenorYearOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 1, "2007-09-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 1, "2008-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 1, "2009-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 1, "2012-03-05", HolidayHandlerType.MODIFIED_FOLLLOWING);
}
+
+ public void testMoveByTenorYearTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 2, "2007-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 2, "2008-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 2, "2009-03-03", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 2, "2012-03-05", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 0, "2006-08-31", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 0, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorSpotOneDayToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 1, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorSpotTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 2, "2006-09-04", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 2, "2006-08-31", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorOvernight() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 0, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 0, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 0, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorOvernightOneDayToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 1, "2006-08-25", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 1, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 1, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 1, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
+
+ public void testMoveByTenorOvernightTwoDaysToSpot() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 2, "2006-08-25", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 2, "2006-08-29", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 2, "2006-09-01", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 2, "2006-08-30", HolidayHandlerType.MODIFIED_FOLLLOWING);
+ }
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractModifiedPreceedingDateCalculatorTest.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -205,21 +205,7 @@
}
- public void testMoveByTenorDays() {
- checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.MODIFIED_PRECEEDING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.MODIFIED_PRECEEDING);
- checkMoveByTenor("2006-08-08", new Tenor(10, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
- checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
- checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
- checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_PRECEEDING);
- }
- public void testMoveByTenorWeek() {
- checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.MODIFIED_PRECEEDING);
- checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.MODIFIED_PRECEEDING);
- checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.MODIFIED_PRECEEDING);
- }
-
public void testAddAcrossMonth() {
final DateCalculator<E> cal = newDateCalculator("bla", HolidayHandlerType.MODIFIED_PRECEEDING);
@@ -241,4 +227,51 @@
checkDate("do NOT move to next month", cal, "2006-08-02");
}
+ public void testMoveByTenorDays() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1D, 0, "2006-08-09", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.DAY), 0, "2006-08-10", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(10, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(11, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(12, TenorCode.DAY), 0, "2006-08-18", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(13, TenorCode.DAY), 0, "2006-08-21", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-09-26", new Tenor(4, TenorCode.DAY), 0, "2006-09-29", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorWeek() {
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1W, 0, "2006-08-15", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.WEEK), 0, "2006-08-22", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(4, TenorCode.WEEK), 0, "2006-09-05", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+
+ public void testMoveByTenorMonth() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1M, 0, "2006-09-29", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2M, 0, "2006-10-31", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-01-31", StandardTenor.T_1M, 0, "2006-02-28", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-01-31", StandardTenor.T_1M, 0, "2008-02-29", HolidayHandlerType.MODIFIED_PRECEEDING);
+
+ checkMoveByTenor("2006-08-08", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-09", StandardTenor.T_1M, 0, "2006-09-08", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(2, TenorCode.MONTH), 0, "2006-10-06", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-08", new Tenor(5, TenorCode.MONTH), 0, "2007-01-08", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorYear() {
+ checkMoveByTenor("2006-08-31", StandardTenor.T_1Y, 0, "2007-08-31", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.T_2Y, 0, "2008-08-29", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_1Y, 0, "2009-02-27", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2008-02-29", StandardTenor.T_4Y, 0, "2012-02-29", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorSpot() {
+ checkMoveByTenor("2006-08-31", StandardTenor.SPOT, 0, "2006-08-31", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-28", StandardTenor.SPOT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
+
+ public void testMoveByTenorOvernight() {
+ checkMoveByTenor("2006-08-24", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-25", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-31", StandardTenor.OVERNIGHT, 0, "2006-09-01", HolidayHandlerType.MODIFIED_PRECEEDING);
+ checkMoveByTenor("2006-08-28", StandardTenor.OVERNIGHT, 0, "2006-08-25", HolidayHandlerType.MODIFIED_PRECEEDING);
+ }
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -422,7 +422,7 @@
}
}
- private void runtests(String[][] tests) {
+ private void runtests(final String[][] tests) {
for (final String[] test : tests) {
runtest(cal, test);
}
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarDateCalculator.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -78,6 +78,26 @@
}
@Override
+ public DateCalculator<Calendar> moveByMonths(final int months) {
+ // LocalDate date = getCurrentBusinessDate();
+ // int day = date.getDayOfMonth();
+ // date = date.withDayOfMonth(1).plusMonths(months);
+ //
+ // int lastDayOfMonth = date.dayOfMonth().getMaximumValue();
+ // if (day>lastDayOfMonth) {
+ // day = lastDayOfMonth;
+ // }
+
+ // setCurrentBusinessDate(date.withDayOfMonth(day));
+
+ if (getHolidayHandler() != null) {
+ setCurrentBusinessDate(getHolidayHandler().moveCurrentDate(this));
+ }
+
+ return this;
+ }
+
+ @Override
protected DateCalculator<Calendar> createNewCalculator(final String name, final Calendar startDate,
final Set<Calendar> holidays, final HolidayHandler<Calendar> handler) {
return new CalendarDateCalculator(name, startDate, holidays, handler);
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateDateCalculator.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -101,4 +101,11 @@
protected Date getToday() {
return Utils.blastTime(Calendar.getInstance()).getTime();
}
+
+ @Override
+ protected DateCalculator<Date> moveByMonths(final int months) {
+ delegate.setCurrentBusinessDate(Utils.getCal(getCurrentBusinessDate()));
+ setCurrentBusinessDate(delegate.moveByMonths(months).getCurrentBusinessDate().getTime());
+ return this;
+ }
}
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -78,6 +78,27 @@
}
@Override
+ public DateCalculator<LocalDate> moveByMonths(final int months) {
+ // LocalDate date = getCurrentBusinessDate();
+ // int day = date.getDayOfMonth();
+ // date = date.withDayOfMonth(1).plusMonths(months);
+ //
+ // int lastDayOfMonth = date.dayOfMonth().getMaximumValue();
+ // if (day>lastDayOfMonth) {
+ // day = lastDayOfMonth;
+ // }
+
+ // setCurrentBusinessDate(date.withDayOfMonth(day));
+ setCurrentBusinessDate(getCurrentBusinessDate().plusMonths(months));
+
+ if (getHolidayHandler() != null) {
+ setCurrentBusinessDate(getHolidayHandler().moveCurrentDate(this));
+ }
+
+ return this;
+ }
+
+ @Override
protected DateCalculator<LocalDate> createNewCalculator(final String name, final LocalDate startDate,
final Set<LocalDate> holidays, final HolidayHandler<LocalDate> handler) {
return new LocalDateCalculator(name, startDate, holidays, handler);
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -90,8 +90,8 @@
final int diff1 = new Period(start, endOfStartYear, PeriodType.days()).getDays();
final int diff2 = new Period(startOfEndYear, end, PeriodType.days()).getDays();
- diff = ((double) (diff1 + 1.0)) / (double) start.dayOfYear().getMaximumValue()
- + ((double) (endYear - startYear - 1.0)) + ((double) (diff2)) / (double) end.dayOfYear().getMaximumValue();
+ diff = ((diff1 + 1.0)) / start.dayOfYear().getMaximumValue()
+ + ((endYear - startYear - 1.0)) + ((double) (diff2)) / (double) end.dayOfYear().getMaximumValue();
}
} else if (basis == PeriodCountBasis.CONV_30_360 || basis == PeriodCountBasis.CONV_360E_ISDA
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -99,4 +99,11 @@
protected YearMonthDay getToday() {
return new YearMonthDay();
}
+
+ @Override
+ protected DateCalculator<YearMonthDay> moveByMonths(final int months) {
+ delegate.setCurrentBusinessDate(getCurrentBusinessDate().toLocalDate());
+ setCurrentBusinessDate(new YearMonthDay(delegate.moveByMonths(months).getCurrentBusinessDate()));
+ return this;
+ }
}
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/DateTimeExcelDateUtilTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/DateTimeExcelDateUtilTest.java 2006-09-10 15:38:09 UTC (rev 149)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/DateTimeExcelDateUtilTest.java 2006-09-10 15:49:08 UTC (rev 150)
@@ -3,6 +3,7 @@
import net.objectlab.kit.datecalc.common.AbstractExcelDateUtilTest;
import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
public class DateTimeExcelDateUtilTest extends AbstractExcelDateUtilTest<DateTime> {
@@ -15,4 +16,10 @@
protected DateTime createDateFromExcel(final double excelDate, final boolean use1904Windowing) {
return JodaExcelDateUtil.getDateTime(excelDate, use1904Windowing);
}
+
+ public void testPlusMonths() {
+ final LocalDate d = new LocalDate("2008-01-31");
+ final LocalDate d2 = d.plusMonths(1);
+ System.out.println("======================> " + d2);
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 15:38:17
|
Revision: 149
http://svn.sourceforge.net/objectlabkit/?rev=149&view=rev
Author: marchy
Date: 2006-09-10 08:38:09 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
correction in javadoc
Modified Paths:
--------------
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java 2006-09-10 15:35:57 UTC (rev 148)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/HolidayHandlerDateWrapper.java 2006-09-10 15:38:09 UTC (rev 149)
@@ -25,7 +25,7 @@
import net.objectlab.kit.datecalc.common.Utils;
/**
- * A Wrapper to handle any HolidayHandler<Date> types via a HolidayHandler<Calendar>
+ * A Wrapper to handle any HolidayHandler<Calendar> types via a HolidayHandler<Date>
* delegate
*
* @author Marcin Jekot
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 15:36:28
|
Revision: 148
http://svn.sourceforge.net/objectlabkit/?rev=148&view=rev
Author: marchy
Date: 2006-09-10 08:35:57 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
javadoc update
Modified Paths:
--------------
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarBackwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarForwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarKitCalculatorsFactory.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedFollowingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedPreceedingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarPeriodCountCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateBackwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateKitCalculatorsFactory.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarBackwardHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarBackwardHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarBackwardHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -23,12 +23,12 @@
import net.objectlab.kit.datecalc.common.HolidayHandlerType;
/**
- * TODO javadoc
+ * A Jdk <code>Calendar</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Backward</strong> algorithm.
*
* @author Marcin Jekot
* @author $LastChangedBy: marchy $
* @version $Revision: 99 $ $Date: 2006-09-04 21:30:25 +0100 (Mon, 04 Sep 2006) $
- *
*/
public class CalendarBackwardHandler extends CalendarForwardHandler {
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarForwardHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarForwardHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarForwardHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -24,7 +24,8 @@
import net.objectlab.kit.datecalc.common.HolidayHandlerType;
/**
- * TODO javadoc
+ * A Jdk <code>Calendar</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Forward</strong> algorithm.
*
* @author Marcin Jekot
* @author $LastChangedBy$
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -24,6 +24,14 @@
import net.objectlab.kit.datecalc.common.AbstractIMMDateCalculator;
import net.objectlab.kit.datecalc.common.IMMPeriod;
+/**
+ * Jdk Calendar implementation of the {@link IMMDateCalculator}
+ *
+ * @author Marcin Jekot
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class CalendarIMMDateCalculator extends AbstractIMMDateCalculator<Calendar> {
private static final int NUMBER_DAYS_IN_WEEK = 7;
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarKitCalculatorsFactory.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarKitCalculatorsFactory.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -26,9 +26,9 @@
import net.objectlab.kit.datecalc.common.PeriodCountCalculator;
/**
- * TODO add javadoc
+ * The default factory for getting Jdk <code>Calendar</code> based calculators.
*
- * @author Benoit Xhenseval
+ * @author Marcin Jekot
* @author $LastChangedBy: benoitx $
* @version $Revision: 96 $ $Date: 2006-09-04 16:01:20 +0100 (Mon, 04 Sep 2006) $
*
@@ -45,9 +45,7 @@
return DEFAULT;
}
- /*
- * (non-Javadoc)
- *
+ /**
* @see net.objectlab.kit.datecalc.jdk.JdkDateCalculatorFactory#getDateCalculator(java.lang.String,
* java.lang.String)
*/
@@ -73,15 +71,16 @@
return cal;
}
- /*
- * (non-Javadoc)
- *
+ /**
* @see net.objectlab.kit.datecalc.jdk.JdkDateCalculatorFactory#getPeriodCountCalculator()
*/
public PeriodCountCalculator<Calendar> getPeriodCountCalculator() {
return PCC;
}
+ /**
+ * @see net.objectlab.kit.datecalc.jdk.JdkDateCalculatorFactory#getIMMDateCalculator()
+ */
public IMMDateCalculator<Calendar> getIMMDateCalculator() {
return IMMDC;
}
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedFollowingHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedFollowingHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedFollowingHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -23,8 +23,9 @@
import net.objectlab.kit.datecalc.common.HolidayHandlerType;
/**
- * TODO javadoc
- *
+ * A Jdk <code>Calendar</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Modified Following</strong> algorithm.
+ *
* @author Marcin Jekot
* @author $LastChangedBy: marchy $
* @version $Revision: 99 $ $Date: 2006-09-04 21:30:25 +0100 (Mon, 04 Sep 2006) $
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedPreceedingHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedPreceedingHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarModifiedPreceedingHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -19,10 +19,12 @@
import java.util.Calendar;
import net.objectlab.kit.datecalc.common.DateCalculator;
+import net.objectlab.kit.datecalc.common.HolidayHandler;
import net.objectlab.kit.datecalc.common.HolidayHandlerType;
/**
- * TODO javadoc
+ * A Jdk <code>Calendar</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Modified Preceeding</strong> algorithm.
*
* @author Marcin Jekot
* @author $LastChangedBy: marchy $
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarPeriodCountCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarPeriodCountCalculator.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarPeriodCountCalculator.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -23,7 +23,7 @@
import net.objectlab.kit.datecalc.common.PeriodCountCalculator;
/**
- * TODO javadoc
+ * Jdk <code>Calendar</code> based implementation of the {@link PeriodCountCalculator}
*
* @author Marcin Jekot
* @author $LastChangedBy$
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateBackwardHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateBackwardHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateBackwardHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -23,7 +23,8 @@
import net.objectlab.kit.datecalc.common.HolidayHandlerType;
/**
- * TODO javadoc
+ * A Jdk <code>Date</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Backward</strong> algorithm.
*
* @author Marcin Jekot
* @author $LastChangedBy: marchy $
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -26,7 +26,8 @@
import net.objectlab.kit.datecalc.common.Utils;
/**
- * TODO javadoc
+ * A Jdk <code>Date</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Forward</strong> algorithm.
*
* @author Marcin Jekot
* @author $LastChangedBy: benoitx $
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -26,6 +26,15 @@
import net.objectlab.kit.datecalc.common.IMMPeriod;
import net.objectlab.kit.datecalc.common.Utils;
+/**
+ * Jdk <code>Date</code> based implementation of the {@link IMMDateCalculator}.
+ * It simply delegates to the Calendar implementation.
+ *
+ * @author Marcin Jekot
+ * @author $LastChangedBy: marchy $
+ * @version $Revision: 138 $ $Date: 2006-09-10 14:29:15 +0200 (Sun, 10 Sep 2006) $
+ *
+ */
public class DateIMMDateCalculator extends AbstractIMMDateCalculator<Date> {
private static final CalendarIMMDateCalculator DELEGATE = new CalendarIMMDateCalculator();
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateKitCalculatorsFactory.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateKitCalculatorsFactory.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -26,7 +26,7 @@
import net.objectlab.kit.datecalc.common.PeriodCountCalculator;
/**
- * TODO add javadoc
+ * The default factory for getting Jdk <code>Date</code> based calculators.
*
* @author Benoit Xhenseval
* @author $LastChangedBy: benoitx $
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -26,7 +26,8 @@
import net.objectlab.kit.datecalc.common.Utils;
/**
- * TODO javadoc
+ * A Jdk <code>Date</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Modified Following</strong> algorithm.
*
* @author Marcin Jekot
* @author $LastChangedBy: marchy $
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -20,10 +20,12 @@
import java.util.Date;
import net.objectlab.kit.datecalc.common.DateCalculator;
+import net.objectlab.kit.datecalc.common.HolidayHandler;
import net.objectlab.kit.datecalc.common.HolidayHandlerType;
/**
- * TODO javadoc
+ * A Jdk <code>Date</code> implementation of the {@link HolidayHandler}, for the
+ * <strong>Modified Preceeding</strong> algorithm.
*
* @author Marcin Jekot
* @author $LastChangedBy: marchy $
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java 2006-09-10 15:18:53 UTC (rev 147)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DatePeriodCountCalculator.java 2006-09-10 15:35:57 UTC (rev 148)
@@ -24,7 +24,7 @@
import net.objectlab.kit.datecalc.common.Utils;
/**
- * TODO javadoc
+ * Jdk <code>Date</code> based implementation of the {@link PeriodCountCalculator}
*
* @author Marcin Jekot
* @author $LastChangedBy$
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 15:19:15
|
Revision: 147
http://svn.sourceforge.net/objectlabkit/?rev=147&view=rev
Author: marchy
Date: 2006-09-10 08:18:53 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
javadoc update
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractKitCalculatorsFactory.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -22,9 +22,9 @@
import java.util.concurrent.ConcurrentMap;
/**
- * TODO javadoc
+ * @TODO javadoc
*
- * @author marchi
+ * @author Marcin Jekot
* @author $LastChangedBy: benoitx $
* @version $Revision: 125 $ $Date: 2006-09-07 19:24:20 +0200 (Thu, 07 Sep 2006) $
*
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -20,8 +20,12 @@
/**
* This will be called to determine whether the date should be moved according
* to the special algorithm used.
- *
+ *
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
+ * @param <E>
*/
public interface HolidayHandler<E> {
E moveCurrentDate(DateCalculator<E> date);
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -21,6 +21,9 @@
* Define a series of standard way to handle holidays.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public final class HolidayHandlerType {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -17,10 +17,13 @@
*/
package net.objectlab.kit.datecalc.common;
+
/**
* Defines some standard Day Count basis.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
*/
public enum PeriodCountBasis {
/**
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -21,6 +21,9 @@
* A series of Standard Tenors used by the financial industry.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public final class StandardTenor {
private StandardTenor() {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -20,6 +20,11 @@
/**
* Holds only valid unit and TenorCode: Day, Week, Month, Year, IMM, Overnight,
* TomNext, Spot, SpotNext, SpotWeek.
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class Tenor {
private int units = 0;
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -17,6 +17,14 @@
*/
package net.objectlab.kit.datecalc.common;
+/**
+ * enum of Tenor Codes held by a {@link Tenor}
+ *
+ * @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
+ */
public enum TenorCode {
OVERNIGHT("ON", false),
// TOMNEXT("TN", false),
@@ -34,10 +42,17 @@
this.acceptUnits = acceptUnits;
}
+ /**
+ * @return the string representation of this <code>TenorCode</code>
+ */
public String getCode() {
return code;
}
+ /**
+ * @param code string representation of the <code>TenorCode</code>
+ * @return a <code>TenorCode</code> represented by the string argument
+ */
public static TenorCode fromCode(final String code) {
for (final TenorCode ct : TenorCode.values()) {
if (ct.getCode().equals(code)) {
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -28,7 +28,7 @@
import java.util.TimeZone;
/**
- * TODO javadoc
+ * Utilities class for <code>Date/Calendar</code> conversions
*
* @author Marcin Jekot
* @author $LastModifiedBy$
@@ -44,15 +44,12 @@
private Utils() {
}
- public static Calendar getCal(final Date date) {
- if (date == null) {
- return null;
- }
- final Calendar cal = Calendar.getInstance();
- cal.setTime(date);
- return blastTime(cal);
- }
-
+ /**
+ * Removes set's all "time" fields to zero, leaving only the date portion of the Calendar.
+ * The Calendar passe
+ * @param cal to Calendar object to blast, note, it will be modified
+ * @return the calendar object modified (same instance)
+ */
public static Calendar blastTime(final Calendar cal) {
cal.setTimeZone(TimeZone.getTimeZone("UTC"));
cal.set(Calendar.HOUR_OF_DAY, 0);
@@ -63,26 +60,28 @@
}
/**
+ * Creates a Date object given a string representation of it
*
- * @param str
+ * @param dateStr
* string (return today if string is null)
- * @return today if
+ * @return today if string is null, a Date object representing the string
+ * otherwise
* @throws IllegalArgumentException
* if the string cannot be parsed.
*/
- public static Date createDate(final String str) {
- if (str == null) {
+ public static Date createDate(final String dateStr) {
+ if (dateStr == null) {
return createCalendar(null).getTime();
}
try {
- final Date date = SDF.parse(str);
+ final Date date = SDF.parse(dateStr);
final Calendar cal = getCal(date);
return cal.getTime();
} catch (final ParseException e) {
- throw new IllegalArgumentException("\"" + str + "\"" + " is an invalid date, the pattern is : " + DATE_PATTERN);
+ throw new IllegalArgumentException("\"" + dateStr + "\"" + " is an invalid date, the pattern is : " + DATE_PATTERN);
}
}
-
+
/**
*
* @param str
@@ -104,6 +103,26 @@
}
}
+ /**
+ * Get a Calendar object for a given Date representation
+ * @param date
+ * @return
+ */
+ public static Calendar getCal(final Date date) {
+ if (date == null) {
+ return null;
+ }
+ final Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ return blastTime(cal);
+ }
+
+ /**
+ * Converts a Set of Date objects to a Set of Calendar objects
+ *
+ * @param dates
+ * @return
+ */
public static Set<Calendar> toCalendarSet(final Set<Date> dates) {
final Set<Calendar> calendars = new HashSet<Calendar>();
for (final Date date : dates) {
@@ -112,6 +131,12 @@
return calendars;
}
+ /**
+ * Converts a Set of Calendar objects to a Set of Date objects
+ *
+ * @param calendars
+ * @return
+ */
public static Set<Date> toDateSet(final Set<Calendar> calendars) {
final Set<Date> dates = new HashSet<Date>();
@@ -121,6 +146,13 @@
return dates;
}
+ /**
+ * Converts a <code>List</code> of Calendar objects to a <code>List</code>
+ * of dates
+ *
+ * @param dates
+ * @return
+ */
public static List<Date> toDateList(final List<Calendar> dates) {
final List<Date> dateList = new ArrayList<Date>();
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-10 14:56:37 UTC (rev 146)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-10 15:18:53 UTC (rev 147)
@@ -24,6 +24,9 @@
* Immutable Working Week, default is Mon->Friday.
*
* @author Benoit Xhenseval
+ * @author $LastChangedBy$
+ * @version $Revision$ $Date$
+ *
*/
public class WorkingWeek {
private static final byte MONDAY = 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 14:57:57
|
Revision: 146
http://svn.sourceforge.net/objectlabkit/?rev=146&view=rev
Author: marchy
Date: 2006-09-10 07:56:37 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
updated licence comment on .java files.
at the moment none of the test files have javadoc/licence, let me know if you want them to have, and i'll update
Modified Paths:
--------------
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeekTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateDateCalculatorCombinationTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateForwardDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculatorCombinationTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPrecedingDateCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculatorTest.java
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeek.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardHandler.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateCalculator.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateIMMDateCalculator.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,3 +1,20 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package net.objectlab.kit.datecalc.joda;
import java.util.ArrayList;
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateKitCalculatorsFactory.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingHandler.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,3 +1,20 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.PeriodCountBasis;
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardHandler.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculator.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardHandler.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayIMMDateCalculator.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,3 +1,20 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package net.objectlab.kit.datecalc.joda;
import java.util.ArrayList;
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPreceedingHandler.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculator.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,3 +1,20 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.PeriodCountBasis;
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeekTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeekTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/JodaWorkingWeekTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,18 +1,3 @@
-/*
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import java.util.Calendar;
@@ -23,9 +8,6 @@
import org.joda.time.DateTimeConstants;
import org.joda.time.LocalDate;
-/**
- * @author Benoit Xhenseval
- */
public class JodaWorkingWeekTest extends TestCase {
private JodaWorkingWeek ww;
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateBackwardDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.AbstractBackwardDateCalculatorTest;
@@ -23,13 +6,6 @@
import org.joda.time.LocalDate;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class LocalDateBackwardDateCalculatorTest extends AbstractBackwardDateCalculatorTest<LocalDate> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateDateCalculatorCombinationTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateDateCalculatorCombinationTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateDateCalculatorCombinationTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.AbstractDateCalculatorCombinationTest;
@@ -23,13 +6,6 @@
import org.joda.time.LocalDate;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class LocalDateDateCalculatorCombinationTest extends AbstractDateCalculatorCombinationTest<LocalDate> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateForwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateForwardDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateForwardDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.AbstractForwardDateCalculatorTest;
@@ -23,13 +6,6 @@
import org.joda.time.LocalDate;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class LocalDateForwardDateCalculatorTest extends AbstractForwardDateCalculatorTest<LocalDate> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedFollowingDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.AbstractModifiedFollowingDateCalculatorTest;
@@ -23,13 +6,6 @@
import org.joda.time.LocalDate;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class LocalDateModifiedFollowingDateCalculatorTest extends AbstractModifiedFollowingDateCalculatorTest<LocalDate> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDateModifiedPreceedingDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.AbstractModifiedPreceedingDateCalculatorTest;
@@ -23,13 +6,6 @@
import org.joda.time.LocalDate;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class LocalDateModifiedPreceedingDateCalculatorTest extends AbstractModifiedPreceedingDateCalculatorTest<LocalDate> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- * Copyright 2006 the original author or authors.
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculatorTest;
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayBackwardDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import java.util.Set;
@@ -25,13 +8,6 @@
import org.joda.time.YearMonthDay;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class YearMonthDayBackwardDateCalculatorTest extends AbstractBackwardDateCalculatorTest<YearMonthDay> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculatorCombinationTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculatorCombinationTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayDateCalculatorCombinationTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import java.util.Set;
@@ -25,13 +8,6 @@
import org.joda.time.YearMonthDay;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class YearMonthDayDateCalculatorCombinationTest extends AbstractDateCalculatorCombinationTest<YearMonthDay> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayForwardDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import java.util.Set;
@@ -25,13 +8,6 @@
import org.joda.time.YearMonthDay;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class YearMonthDayForwardDateCalculatorTest extends AbstractForwardDateCalculatorTest<YearMonthDay> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedFollowingDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import java.util.Set;
@@ -25,13 +8,6 @@
import org.joda.time.YearMonthDay;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class YearMonthDayModifiedFollowingDateCalculatorTest extends AbstractModifiedPreceedingDateCalculatorTest<YearMonthDay> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPrecedingDateCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPrecedingDateCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayModifiedPrecedingDateCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id$
- *
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import java.util.Set;
@@ -25,13 +8,6 @@
import org.joda.time.YearMonthDay;
-/**
- *
- * @author xhensevb
- * @author $LastChangedBy$
- * @version $Revision$ $Date$
- *
- */
public class YearMonthDayModifiedPrecedingDateCalculatorTest extends AbstractModifiedFollowingDateCalculatorTest<YearMonthDay> {
@Override
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculatorTest.java 2006-09-10 14:56:37 UTC (rev 146)
@@ -1,20 +1,3 @@
-/*
- * $Id: LocalDatePeriodCountCalculatorTest.java 109 2006-09-05 11:16:39Z benoitx $
- * Copyright 2006 the original author or authors.
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.joda;
import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculatorTest;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 14:51:50
|
Revision: 145
http://svn.sourceforge.net/objectlabkit/?rev=145&view=rev
Author: marchy
Date: 2006-09-10 07:51:14 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
updated licence comment on .java files
Modified Paths:
--------------
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java
trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkWorkingWeekTest.java
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -1,3 +1,20 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package net.objectlab.kit.datecalc.jdk;
import java.util.ArrayList;
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateForwardHandler.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateIMMDateCalculator.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -1,3 +1,20 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
package net.objectlab.kit.datecalc.jdk;
import java.util.ArrayList;
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedFollowingHandler.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -14,7 +14,8 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
- */package net.objectlab.kit.datecalc.jdk;
+ */
+package net.objectlab.kit.datecalc.jdk;
import java.util.Calendar;
import java.util.Date;
Modified: trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java
===================================================================
--- trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/DateModifiedPreceedingHandler.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -14,7 +14,8 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
- */package net.objectlab.kit.datecalc.jdk;
+ */
+package net.objectlab.kit.datecalc.jdk;
import java.util.Date;
Modified: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -1,18 +1,3 @@
-/*
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.jdk;
import java.util.Calendar;
Modified: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkWorkingWeekTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkWorkingWeekTest.java 2006-09-10 14:46:52 UTC (rev 144)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkWorkingWeekTest.java 2006-09-10 14:51:14 UTC (rev 145)
@@ -1,18 +1,3 @@
-/*
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.jdk;
import java.util.Calendar;
@@ -21,9 +6,6 @@
import junit.framework.TestCase;
import net.objectlab.kit.datecalc.common.WorkingWeek;
-/**
- * @author Benoit Xhenseval
- */
public class JdkWorkingWeekTest extends TestCase {
public void testIsWorkingDayFromCalendar() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 14:47:35
|
Revision: 144
http://svn.sourceforge.net/objectlabkit/?rev=144&view=rev
Author: marchy
Date: 2006-09-10 07:46:52 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
updated licence comments
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/WorkingWeekTest.java
Property Changed:
----------------
trunk/datecalc-common/.settings/org.eclipse.jdt.core.prefs
Property changes on: trunk/datecalc-common/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:keywords
+
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandler.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/HolidayHandlerType.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/PeriodCountBasis.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Tenor.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/Utils.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/WorkingWeek.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright 2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,18 +1,3 @@
-/*
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.common;
import java.util.HashSet;
@@ -23,10 +8,6 @@
import junit.framework.TestCase;
import junit.framework.TestSuite;
-/**
- * @author xhensevalb
- *
- */
public class TenorTest extends TestCase {
/**
* Create the test case
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/WorkingWeekTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/WorkingWeekTest.java 2006-09-10 14:35:56 UTC (rev 143)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/WorkingWeekTest.java 2006-09-10 14:46:52 UTC (rev 144)
@@ -1,18 +1,3 @@
-/*
- * Copyright 2006 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
package net.objectlab.kit.datecalc.common;
import java.util.Calendar;
@@ -21,9 +6,6 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-/**
- * @author Benoit Xhenseval
- */
public class WorkingWeekTest extends TestCase {
public void testIsWorkingDayFromCalendar() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 14:36:47
|
Revision: 143
http://svn.sourceforge.net/objectlabkit/?rev=143&view=rev
Author: marchy
Date: 2006-09-10 07:35:56 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
renamed AbstractPeriodCountCalculator to AbstractPeriodCountCalculatorTest, and added ACT_ACT test cases based on joda implementations (they should still be checked tho?) the jdk ones fail, will look into this next
Modified Paths:
--------------
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java
trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java
trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculatorTest.java
Added Paths:
-----------
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java
Removed Paths:
-------------
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java
Deleted: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java 2006-09-10 13:55:43 UTC (rev 142)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java 2006-09-10 14:35:56 UTC (rev 143)
@@ -1,385 +0,0 @@
-package net.objectlab.kit.datecalc.common;
-
-import java.math.BigDecimal;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-public abstract class AbstractPeriodCountCalculator<E> extends TestCase {
-
- private static final String[][] ACT_365 = {
- // name start end period dayDiff yearDiff
- { "0D", "2006-08-08", "2006-08-08", "ACT_365", "0", "0.00" },
- { "1D", "2006-08-08", "2006-08-09", "ACT_365", "1", "0.002740" },
- { "1W", "2006-08-08", "2006-08-15", "ACT_365", "7", "0.019178" },
- { "1M", "2006-08-08", "2006-09-08", "ACT_365", "31", "0.084932" },
- { "3M", "2006-08-08", "2006-11-08", "ACT_365", "92", "0.252055" },
- { "6M", "2006-08-08", "2007-02-08", "ACT_365", "184", "0.504110" },
- { "9M", "2006-08-08", "2007-05-08", "ACT_365", "273", "0.747945" },
- { "1Y", "2006-08-08", "2007-08-08", "ACT_365", "365", "1.000000" },
- { "2Y", "2006-08-08", "2008-08-08", "ACT_365", "731", "2.002740" },
- { "3Y", "2006-08-08", "2009-08-10", "ACT_365", "1098", "3.008219" },
- { "4Y", "2006-08-08", "2010-08-09", "ACT_365", "1462", "4.005479" },
- { "5Y", "2006-08-08", "2011-08-08", "ACT_365", "1826", "5.002740" },
- { "7Y", "2006-08-08", "2013-08-08", "ACT_365", "2557", "7.005479" },
- { "10Y", "2006-08-08", "2016-08-08", "ACT_365", "3653", "10.008219" },
- { "15Y", "2006-08-08", "2021-08-09", "ACT_365", "5480", "15.013699" },
- { "20Y", "2006-08-08", "2026-08-10", "ACT_365", "7307", "20.019178" },
- { "30Y", "2006-08-08", "2036-08-08", "ACT_365", "10958", "30.021918" },
- // leap year - funny date...
- { "0D", "2008-02-29", "2008-02-29", "ACT_365", "0", "0.00" },
- { "1D", "2008-02-29", "2008-03-03", "ACT_365", "3", "0.008219" },
- { "1W", "2008-02-29", "2008-03-07", "ACT_365", "7", "0.019178" },
- { "1M", "2008-02-29", "2008-03-31", "ACT_365", "31", "0.084932" },
- { "3M", "2008-02-29", "2008-05-29", "ACT_365", "90", "0.246575" },
- { "6M", "2008-02-29", "2008-08-29", "ACT_365", "182", "0.498630" },
- { "9M", "2008-02-29", "2008-11-28", "ACT_365", "273", "0.747945" },
- { "1Y", "2008-02-29", "2009-02-27", "ACT_365", "364", "0.997260" },
- { "2Y", "2008-02-29", "2010-02-26", "ACT_365", "728", "1.994521" },
- { "3Y", "2008-02-29", "2011-02-28", "ACT_365", "1095", "3.000000" },
- { "4Y", "2008-02-29", "2012-02-29", "ACT_365", "1461", "4.002740" },
- { "5Y", "2008-02-29", "2013-02-28", "ACT_365", "1826", "5.002740" },
- { "7Y", "2008-02-29", "2015-02-27", "ACT_365", "2555", "7.000000" },
- { "10Y", "2008-02-29", "2018-02-28", "ACT_365", "3652", "10.005479" },
- { "15Y", "2008-02-29", "2023-02-28", "ACT_365", "5478", "15.008219" },
- { "20Y", "2008-02-29", "2028-02-29", "ACT_365", "7305", "20.013699" },
- { "30Y", "2008-02-29", "2038-02-26", "ACT_365", "10955", "30.013699" },
- // start date end of month...
- { "0D", "1998-12-31", "1998-12-31", "ACT_365", "0", "0.00" },
- { "1D", "1998-12-31", "1999-01-01", "ACT_365", "1", "0.002740" },
- { "1W", "1998-12-31", "1999-01-07", "ACT_365", "7", "0.019178" },
- { "1M", "1998-12-31", "1999-01-29", "ACT_365", "29", "0.079452" },
- { "3M", "1998-12-31", "1999-03-31", "ACT_365", "90", "0.246575" },
- { "6M", "1998-12-31", "1999-06-30", "ACT_365", "181", "0.495890" },
- { "9M", "1998-12-31", "1999-09-30", "ACT_365", "273", "0.747945" },
- { "1Y", "1998-12-31", "1999-12-31", "ACT_365", "365", "1.000000" },
- { "2Y", "1998-12-31", "2000-12-29", "ACT_365", "729", "1.997260" },
- { "3Y", "1998-12-31", "2001-12-31", "ACT_365", "1096", "3.002740" },
- { "4Y", "1998-12-31", "2002-12-31", "ACT_365", "1461", "4.002740" },
- { "5Y", "1998-12-31", "2003-12-31", "ACT_365", "1826", "5.002740" },
- { "7Y", "1998-12-31", "2005-12-30", "ACT_365", "2556", "7.002740" },
- { "10Y", "1998-12-31", "2008-12-31", "ACT_365", "3653", "10.008219" },
- { "15Y", "1998-12-31", "2013-12-31", "ACT_365", "5479", "15.010959" },
- { "20Y", "1998-12-31", "2018-12-31", "ACT_365", "7305", "20.013699" },
- { "30Y", "1998-12-31", "2028-12-29", "ACT_365", "10956", "30.016438" }
- // end of set
- };
-
- private static final String[][] ACT_360 = {
- // name start end period dayDiff yearDiff
- { "0D", "2006-08-08", "2006-08-08", "ACT_360", "0", "0.00" },
- { "1D", "2006-08-08", "2006-08-09", "ACT_360", "1", "0.002778" },
- { "1W", "2006-08-08", "2006-08-15", "ACT_360", "7", "0.019444" },
- { "1M", "2006-08-08", "2006-09-08", "ACT_360", "31", "0.086111" },
- { "3M", "2006-08-08", "2006-11-08", "ACT_360", "92", "0.255556" },
- { "6M", "2006-08-08", "2007-02-08", "ACT_360", "184", "0.511111" },
- { "9M", "2006-08-08", "2007-05-08", "ACT_360", "273", "0.758333" },
- { "1Y", "2006-08-08", "2007-08-08", "ACT_360", "365", "1.013889" },
- { "2Y", "2006-08-08", "2008-08-08", "ACT_360", "731", "2.030556" },
- { "3Y", "2006-08-08", "2009-08-10", "ACT_360", "1098", "3.050000" },
- { "4Y", "2006-08-08", "2010-08-09", "ACT_360", "1462", "4.061111" },
- { "5Y", "2006-08-08", "2011-08-08", "ACT_360", "1826", "5.072222" },
- { "7Y", "2006-08-08", "2013-08-08", "ACT_360", "2557", "7.102778" },
- { "10Y", "2006-08-08", "2016-08-08", "ACT_360", "3653", "10.147222" },
- { "15Y", "2006-08-08", "2021-08-09", "ACT_360", "5480", "15.222222" },
- { "20Y", "2006-08-08", "2026-08-10", "ACT_360", "7307", "20.297222" },
- { "30Y", "2006-08-08", "2036-08-08", "ACT_360", "10958", "30.438889" },
- // leap year - funny date...
- { "0D", "2008-02-29", "2008-02-29", "ACT_360", "0", "0.00" },
- { "1D", "2008-02-29", "2008-03-03", "ACT_360", "3", "0.008333" },
- { "1W", "2008-02-29", "2008-03-07", "ACT_360", "7", "0.019444" },
- { "1M", "2008-02-29", "2008-03-31", "ACT_360", "31", "0.086111" },
- { "3M", "2008-02-29", "2008-05-29", "ACT_360", "90", "0.250000" },
- { "6M", "2008-02-29", "2008-08-29", "ACT_360", "182", "0.505556" },
- { "9M", "2008-02-29", "2008-11-28", "ACT_360", "273", "0.758333" },
- { "1Y", "2008-02-29", "2009-02-27", "ACT_360", "364", "1.011111" },
- { "2Y", "2008-02-29", "2010-02-26", "ACT_360", "728", "2.022222" },
- { "3Y", "2008-02-29", "2011-02-28", "ACT_360", "1095", "3.041667" },
- { "4Y", "2008-02-29", "2012-02-29", "ACT_360", "1461", "4.058333" },
- { "5Y", "2008-02-29", "2013-02-28", "ACT_360", "1826", "5.072222" },
- { "7Y", "2008-02-29", "2015-02-27", "ACT_360", "2555", "7.097222" },
- { "10Y", "2008-02-29", "2018-02-28", "ACT_360", "3652", "10.144444" },
- { "15Y", "2008-02-29", "2023-02-28", "ACT_360", "5478", "15.216667" },
- { "20Y", "2008-02-29", "2028-02-29", "ACT_360", "7305", "20.291667" },
- { "30Y", "2008-02-29", "2038-02-26", "ACT_360", "10955", "30.430556" },
- // start date end of month...
- { "0D", "1998-12-31", "1998-12-31", "ACT_360", "0", "0.00" },
- { "1D", "1998-12-31", "1999-01-01", "ACT_360", "1", "0.002778" },
- { "1W", "1998-12-31", "1999-01-07", "ACT_360", "7", "0.019444" },
- { "1M", "1998-12-31", "1999-01-29", "ACT_360", "29", "0.080556" },
- { "3M", "1998-12-31", "1999-03-31", "ACT_360", "90", "0.250000" },
- { "6M", "1998-12-31", "1999-06-30", "ACT_360", "181", "0.502778" },
- { "9M", "1998-12-31", "1999-09-30", "ACT_360", "273", "0.758333" },
- { "1Y", "1998-12-31", "1999-12-31", "ACT_360", "365", "1.013889" },
- { "2Y", "1998-12-31", "2000-12-29", "ACT_360", "729", "2.025000" },
- { "3Y", "1998-12-31", "2001-12-31", "ACT_360", "1096", "3.044444" },
- { "4Y", "1998-12-31", "2002-12-31", "ACT_360", "1461", "4.058333" },
- { "5Y", "1998-12-31", "2003-12-31", "ACT_360", "1826", "5.072222" },
- { "7Y", "1998-12-31", "2005-12-30", "ACT_360", "2556", "7.100000" },
- { "10Y", "1998-12-31", "2008-12-31", "ACT_360", "3653", "10.147222" },
- { "15Y", "1998-12-31", "2013-12-31", "ACT_360", "5479", "15.219444" },
- { "20Y", "1998-12-31", "2018-12-31", "ACT_360", "7305", "20.291667" },
- { "30Y", "1998-12-31", "2028-12-29", "ACT_360", "10956", "30.433333" }
- // end of set
- };
-
- private static final String[][] CONV_30_360 = {
- // name start end period dayDiff yearDiff
- { "0D", "2006-08-08", "2006-08-08", "CONV_30_360", "0", "0.00" },
- { "1D", "2006-08-08", "2006-08-09", "CONV_30_360", "1", "0.002778" },
- { "1W", "2006-08-08", "2006-08-15", "CONV_30_360", "7", "0.019444" },
- { "1M", "2006-08-08", "2006-09-08", "CONV_30_360", "30", "0.083333" },
- { "3M", "2006-08-08", "2006-11-08", "CONV_30_360", "90", "0.250000" },
- { "6M", "2006-08-08", "2007-02-08", "CONV_30_360", "180", "0.500000" },
- { "9M", "2006-08-08", "2007-05-08", "CONV_30_360", "270", "0.750000" },
- { "1Y", "2006-08-08", "2007-08-08", "CONV_30_360", "360", "1.000000" },
- { "2Y", "2006-08-08", "2008-08-08", "CONV_30_360", "720", "2.000000" },
- { "3Y", "2006-08-08", "2009-08-10", "CONV_30_360", "1082", "3.005556" },
- { "4Y", "2006-08-08", "2010-08-09", "CONV_30_360", "1441", "4.002778" },
- { "5Y", "2006-08-08", "2011-08-08", "CONV_30_360", "1800", "5.000000" },
- { "7Y", "2006-08-08", "2013-08-08", "CONV_30_360", "2520", "7.000000" },
- { "10Y", "2006-08-08", "2016-08-08", "CONV_30_360", "3600", "10.000000" },
- { "15Y", "2006-08-08", "2021-08-09", "CONV_30_360", "5401", "15.002778" },
- { "20Y", "2006-08-08", "2026-08-10", "CONV_30_360", "7202", "20.005556" },
- { "30Y", "2006-08-08", "2036-08-08", "CONV_30_360", "10800", "30.000000" },
- // leap year - funny date...
- { "0D", "2008-02-29", "2008-02-29", "CONV_30_360", "0", "0.00" },
- { "1D", "2008-02-29", "2008-03-03", "CONV_30_360", "4", "0.011111" },
- { "1W", "2008-02-29", "2008-03-07", "CONV_30_360", "8", "0.022222" },
- { "1M", "2008-02-29", "2008-03-31", "CONV_30_360", "32", "0.088889" },
- { "3M", "2008-02-29", "2008-05-29", "CONV_30_360", "90", "0.250000" },
- { "6M", "2008-02-29", "2008-08-29", "CONV_30_360", "180", "0.500000" },
- { "9M", "2008-02-29", "2008-11-28", "CONV_30_360", "269", "0.747222" },
- { "1Y", "2008-02-29", "2009-02-27", "CONV_30_360", "358", "0.994444" },
- { "2Y", "2008-02-29", "2010-02-26", "CONV_30_360", "717", "1.991667" },
- { "3Y", "2008-02-29", "2011-02-28", "CONV_30_360", "1079", "2.997222" },
- { "4Y", "2008-02-29", "2012-02-29", "CONV_30_360", "1440", "4.000000" },
- { "5Y", "2008-02-29", "2013-02-28", "CONV_30_360", "1799", "4.997222" },
- { "7Y", "2008-02-29", "2015-02-27", "CONV_30_360", "2518", "6.994444" },
- { "10Y", "2008-02-29", "2018-02-28", "CONV_30_360", "3599", "9.997222" },
- { "15Y", "2008-02-29", "2023-02-28", "CONV_30_360", "5399", "14.997222" },
- { "20Y", "2008-02-29", "2028-02-29", "CONV_30_360", "7200", "20.000000" },
- { "30Y", "2008-02-29", "2038-02-26", "CONV_30_360", "10797", "29.991667" },
- // start date end of month...
- { "0D", "1998-12-31", "1998-12-31", "CONV_30_360", "0", "0.000000" },
- { "1D", "1998-12-31", "1999-01-01", "CONV_30_360", "1", "0.002778" },
- { "1W", "1998-12-31", "1999-01-07", "CONV_30_360", "7", "0.019444" },
- { "1M", "1998-12-31", "1999-01-29", "CONV_30_360", "29", "0.080556" },
- { "3M", "1998-12-31", "1999-03-31", "CONV_30_360", "90", "0.250000" },
- { "6M", "1998-12-31", "1999-06-30", "CONV_30_360", "180", "0.500000" },
- { "9M", "1998-12-31", "1999-09-30", "CONV_30_360", "270", "0.750000" },
- { "1Y", "1998-12-31", "1999-12-31", "CONV_30_360", "360", "1.000000" },
- { "2Y", "1998-12-31", "2000-12-29", "CONV_30_360", "719", "1.997222" },
- { "3Y", "1998-12-31", "2001-12-31", "CONV_30_360", "1080", "3.000000" },
- { "4Y", "1998-12-31", "2002-12-31", "CONV_30_360", "1440", "4.000000" },
- { "5Y", "1998-12-31", "2003-12-31", "CONV_30_360", "1800", "5.000000" },
- { "7Y", "1998-12-31", "2005-12-30", "CONV_30_360", "2520", "7.000000" },
- { "10Y", "1998-12-31", "2008-12-31", "CONV_30_360", "3600", "10.000000" },
- { "15Y", "1998-12-31", "2013-12-31", "CONV_30_360", "5400", "15.000000" },
- { "20Y", "1998-12-31", "2018-12-31", "CONV_30_360", "7200", "20.000000" },
- { "30Y", "1998-12-31", "2028-12-29", "CONV_30_360", "10799", "29.997222" }
- // end of set
- };
-
- private static final String[][] CONV_360E_ISDA = {
- // name start end period dayDiff yearDiff
- { "0D", "2006-08-08", "2006-08-08", "CONV_360E_ISDA", "0", "0.00" },
- { "1D", "2006-08-08", "2006-08-09", "CONV_360E_ISDA", "1", "0.002778" },
- { "1W", "2006-08-08", "2006-08-15", "CONV_360E_ISDA", "7", "0.019444" },
- { "1M", "2006-08-08", "2006-09-08", "CONV_360E_ISDA", "30", "0.083333" },
- { "3M", "2006-08-08", "2006-11-08", "CONV_360E_ISDA", "90", "0.250000" },
- { "6M", "2006-08-08", "2007-02-08", "CONV_360E_ISDA", "180", "0.500000" },
- { "9M", "2006-08-08", "2007-05-08", "CONV_360E_ISDA", "270", "0.750000" },
- { "1Y", "2006-08-08", "2007-08-08", "CONV_360E_ISDA", "360", "1.000000" },
- { "2Y", "2006-08-08", "2008-08-08", "CONV_360E_ISDA", "720", "2.000000" },
- { "3Y", "2006-08-08", "2009-08-10", "CONV_360E_ISDA", "1082", "3.005556" },
- { "4Y", "2006-08-08", "2010-08-09", "CONV_360E_ISDA", "1441", "4.002778" },
- { "5Y", "2006-08-08", "2011-08-08", "CONV_360E_ISDA", "1800", "5.000000" },
- { "7Y", "2006-08-08", "2013-08-08", "CONV_360E_ISDA", "2520", "7.000000" },
- { "10Y", "2006-08-08", "2016-08-08", "CONV_360E_ISDA", "3600", "10.000000" },
- { "15Y", "2006-08-08", "2021-08-09", "CONV_360E_ISDA", "5401", "15.002778" },
- { "20Y", "2006-08-08", "2026-08-10", "CONV_360E_ISDA", "7202", "20.005556" },
- { "30Y", "2006-08-08", "2036-08-08", "CONV_360E_ISDA", "10800", "30.000000" },
- // leap year - funny date...
- { "0D", "2008-02-29", "2008-02-29", "CONV_360E_ISDA", "0", "0.00" },
- { "1D", "2008-02-29", "2008-03-03", "CONV_360E_ISDA", "4", "0.011111" },
- { "1W", "2008-02-29", "2008-03-07", "CONV_360E_ISDA", "8", "0.022222" },
- { "1M", "2008-02-29", "2008-03-31", "CONV_360E_ISDA", "31", "0.086111" },
- { "3M", "2008-02-29", "2008-05-29", "CONV_360E_ISDA", "90", "0.250000" },
- { "6M", "2008-02-29", "2008-08-29", "CONV_360E_ISDA", "180", "0.500000" },
- { "9M", "2008-02-29", "2008-11-28", "CONV_360E_ISDA", "269", "0.747222" },
- { "1Y", "2008-02-29", "2009-02-27", "CONV_360E_ISDA", "358", "0.994444" },
- { "2Y", "2008-02-29", "2010-02-26", "CONV_360E_ISDA", "717", "1.991667" },
- { "3Y", "2008-02-29", "2011-02-28", "CONV_360E_ISDA", "1079", "2.997222" },
- { "4Y", "2008-02-29", "2012-02-29", "CONV_360E_ISDA", "1440", "4.000000" },
- { "5Y", "2008-02-29", "2013-02-28", "CONV_360E_ISDA", "1799", "4.997222" },
- { "7Y", "2008-02-29", "2015-02-27", "CONV_360E_ISDA", "2518", "6.994444" },
- { "10Y", "2008-02-29", "2018-02-28", "CONV_360E_ISDA", "3599", "9.997222" },
- { "15Y", "2008-02-29", "2023-02-28", "CONV_360E_ISDA", "5399", "14.997222" },
- { "20Y", "2008-02-29", "2028-02-29", "CONV_360E_ISDA", "7200", "20.000000" },
- { "30Y", "2008-02-29", "2038-02-26", "CONV_360E_ISDA", "10797", "29.991667" },
- // start date end of month...
- { "0D", "1998-12-31", "1998-12-31", "CONV_360E_ISDA", "0", "0.00" },
- { "1D", "1998-12-31", "1999-01-01", "CONV_360E_ISDA", "1", "0.002778" },
- { "1W", "1998-12-31", "1999-01-07", "CONV_360E_ISDA", "7", "0.019444" },
- { "1M", "1998-12-31", "1999-01-29", "CONV_360E_ISDA", "29", "0.080556" },
- { "3M", "1998-12-31", "1999-03-31", "CONV_360E_ISDA", "90", "0.250000" },
- { "6M", "1998-12-31", "1999-06-30", "CONV_360E_ISDA", "180", "0.500000" },
- { "9M", "1998-12-31", "1999-09-30", "CONV_360E_ISDA", "270", "0.750000" },
- { "1Y", "1998-12-31", "1999-12-31", "CONV_360E_ISDA", "360", "1.000000" },
- { "2Y", "1998-12-31", "2000-12-29", "CONV_360E_ISDA", "719", "1.997222" },
- { "3Y", "1998-12-31", "2001-12-31", "CONV_360E_ISDA", "1080", "3.000000" },
- { "4Y", "1998-12-31", "2002-12-31", "CONV_360E_ISDA", "1440", "4.000000" },
- { "5Y", "1998-12-31", "2003-12-31", "CONV_360E_ISDA", "1800", "5.000000" },
- { "7Y", "1998-12-31", "2005-12-30", "CONV_360E_ISDA", "2520", "7.000000" },
- { "10Y", "1998-12-31", "2008-12-31", "CONV_360E_ISDA", "3600", "10.000000" },
- { "15Y", "1998-12-31", "2013-12-31", "CONV_360E_ISDA", "5400", "15.000000" },
- { "20Y", "1998-12-31", "2018-12-31", "CONV_360E_ISDA", "7200", "20.000000" },
- { "30Y", "1998-12-31", "2028-12-29", "CONV_360E_ISDA", "10799", "29.997222" }
- // end of set
- };
-
- private static final String[][] CONV_360E_ISMA = {
- // name start end period dayDiff yearDiff
- { "0D", "2006-08-08", "2006-08-08", "CONV_360E_ISMA", "0", "0.00" },
- { "1D", "2006-08-08", "2006-08-09", "CONV_360E_ISMA", "1", "0.002778" },
- { "1W", "2006-08-08", "2006-08-15", "CONV_360E_ISMA", "7", "0.019444" },
- { "1M", "2006-08-08", "2006-09-08", "CONV_360E_ISMA", "30", "0.083333" },
- { "3M", "2006-08-08", "2006-11-08", "CONV_360E_ISMA", "90", "0.250000" },
- { "6M", "2006-08-08", "2007-02-08", "CONV_360E_ISMA", "180", "0.500000" },
- { "9M", "2006-08-08", "2007-05-08", "CONV_360E_ISMA", "270", "0.750000" },
- { "1Y", "2006-08-08", "2007-08-08", "CONV_360E_ISMA", "360", "1.000000" },
- { "2Y", "2006-08-08", "2008-08-08", "CONV_360E_ISMA", "720", "2.000000" },
- { "3Y", "2006-08-08", "2009-08-10", "CONV_360E_ISMA", "1082", "3.005556" },
- { "4Y", "2006-08-08", "2010-08-09", "CONV_360E_ISMA", "1441", "4.002778" },
- { "5Y", "2006-08-08", "2011-08-08", "CONV_360E_ISMA", "1800", "5.000000" },
- { "7Y", "2006-08-08", "2013-08-08", "CONV_360E_ISMA", "2520", "7.000000" },
- { "10Y", "2006-08-08", "2016-08-08", "CONV_360E_ISMA", "3600", "10.000000" },
- { "15Y", "2006-08-08", "2021-08-09", "CONV_360E_ISMA", "5401", "15.002778" },
- { "20Y", "2006-08-08", "2026-08-10", "CONV_360E_ISMA", "7202", "20.005556" },
- { "30Y", "2006-08-08", "2036-08-08", "CONV_360E_ISMA", "10800", "30.000000" },
- // leap year - funny date...
- { "0D", "2008-02-29", "2008-02-29", "CONV_360E_ISMA", "0", "0.00" },
- { "1D", "2008-02-29", "2008-03-03", "CONV_360E_ISMA", "4", "0.011111" },
- { "1W", "2008-02-29", "2008-03-07", "CONV_360E_ISMA", "8", "0.022222" },
- { "1M", "2008-02-29", "2008-03-31", "CONV_360E_ISMA", "31", "0.086111" },
- { "3M", "2008-02-29", "2008-05-29", "CONV_360E_ISMA", "90", "0.250000" },
- { "6M", "2008-02-29", "2008-08-29", "CONV_360E_ISMA", "180", "0.500000" },
- { "9M", "2008-02-29", "2008-11-28", "CONV_360E_ISMA", "269", "0.747222" },
- { "1Y", "2008-02-29", "2009-02-27", "CONV_360E_ISMA", "358", "0.994444" },
- { "2Y", "2008-02-29", "2010-02-26", "CONV_360E_ISMA", "717", "1.991667" },
- { "3Y", "2008-02-29", "2011-02-28", "CONV_360E_ISMA", "1079", "2.997222" },
- { "4Y", "2008-02-29", "2012-02-29", "CONV_360E_ISMA", "1440", "4.000000" },
- { "5Y", "2008-02-29", "2013-02-28", "CONV_360E_ISMA", "1799", "4.997222" },
- { "7Y", "2008-02-29", "2015-02-27", "CONV_360E_ISMA", "2518", "6.994444" },
- { "10Y", "2008-02-29", "2018-02-28", "CONV_360E_ISMA", "3599", "9.997222" },
- { "15Y", "2008-02-29", "2023-02-28", "CONV_360E_ISMA", "5399", "14.997222" },
- { "20Y", "2008-02-29", "2028-02-29", "CONV_360E_ISMA", "7200", "20.000000" },
- { "30Y", "2008-02-29", "2038-02-26", "CONV_360E_ISMA", "10797", "29.991667" },
- // start date end of month...
- { "0D", "1998-12-31", "1998-12-31", "CONV_360E_ISMA", "0", "0.00" },
- { "1D", "1998-12-31", "1999-01-01", "CONV_360E_ISMA", "1", "0.002778" },
- { "1W", "1998-12-31", "1999-01-07", "CONV_360E_ISMA", "7", "0.019444" },
- { "1M", "1998-12-31", "1999-01-29", "CONV_360E_ISMA", "29", "0.080556" },
- { "3M", "1998-12-31", "1999-03-31", "CONV_360E_ISMA", "90", "0.250000" },
- { "6M", "1998-12-31", "1999-06-30", "CONV_360E_ISMA", "180", "0.500000" },
- { "9M", "1998-12-31", "1999-09-30", "CONV_360E_ISMA", "270", "0.750000" },
- { "1Y", "1998-12-31", "1999-12-31", "CONV_360E_ISMA", "360", "1.000000" },
- { "2Y", "1998-12-31", "2000-12-29", "CONV_360E_ISMA", "719", "1.997222" },
- { "3Y", "1998-12-31", "2001-12-31", "CONV_360E_ISMA", "1080", "3.000000" },
- { "4Y", "1998-12-31", "2002-12-31", "CONV_360E_ISMA", "1440", "4.000000" },
- { "5Y", "1998-12-31", "2003-12-31", "CONV_360E_ISMA", "1800", "5.000000" },
- { "7Y", "1998-12-31", "2005-12-30", "CONV_360E_ISMA", "2520", "7.000000" },
- { "10Y", "1998-12-31", "2008-12-31", "CONV_360E_ISMA", "3600", "10.000000" },
- { "15Y", "1998-12-31", "2013-12-31", "CONV_360E_ISMA", "5400", "15.000000" },
- { "20Y", "1998-12-31", "2018-12-31", "CONV_360E_ISMA", "7200", "20.000000" },
- { "30Y", "1998-12-31", "2028-12-29", "CONV_360E_ISMA", "10799", "29.997222" }
- // end of set
- };
-
- //TODO fill with values
- private static final String[][] ACT_ACT = null;
-
- private PeriodCountCalculator<E> cal;
-
- public void setUp() {
- cal = getPeriodCountCalculator();
- }
-
- public abstract PeriodCountCalculator<E> getPeriodCountCalculator();
-
- public abstract E parseDate(String string);
-
- public abstract E getDate();
-
- public void testSanity() {
- Assert.assertNotNull(cal);
- }
-
- public void testConv30EvIsma() {
- runtests(CONV_360E_ISMA);
- }
-
- public void testConv30Ev360() {
- runtests(CONV_360E_ISDA);
- }
-
- public void testConv30v360() {
- runtests(CONV_30_360);
- }
-
- public void testAct365() {
- runtests(ACT_365);
- }
-
- public void testAct360() {
- runtests(ACT_360);
- }
-
- public void testActAct() {
- runtests(ACT_ACT);
- }
-
-
- public void testUnsupportedType() {
- Assert.assertNotNull(cal);
-
- final PeriodCountBasis pcount = PeriodCountBasis.ACT_UST;
- final E start = getDate();
- final E end = getDate();
-
- try {
- cal.yearDiff(start, end, pcount);
- Assert.fail("Should have refused the algo...");
- } catch (final UnsupportedOperationException e) {
- // ok
- }
-
- try {
- cal.monthDiff(start, end, pcount);
- Assert.fail("Should have refused the algo...");
- } catch (final UnsupportedOperationException e) {
- // ok
- }
- }
-
- private void runtests(String[][] tests) {
- for (final String[] test : tests) {
- runtest(cal, test);
- }
- }
-
- private void runtest(final PeriodCountCalculator<E> cal, final String[] test) {
- final String name = test[0];
- final E start = parseDate(test[1]);
- final E end = parseDate(test[2]);
- final PeriodCountBasis pcount = PeriodCountBasis.valueOf(test[3]);
- final int dayDiff = Integer.parseInt(test[4]);
- Assert.assertEquals(name + " Basis:" + pcount + " start:" + start + " dayDiff", dayDiff, cal.dayDiff(start, end, pcount));
-
- final BigDecimal yearDiff = new BigDecimal(cal.yearDiff(start, end, pcount)).setScale(6, BigDecimal.ROUND_HALF_UP);
- Assert.assertTrue(name + " Basis:" + pcount + " yearDiff expected:" + test[5] + " got:" + yearDiff, (new BigDecimal(
- test[5])).compareTo(yearDiff) == 0);
- }
-
-}
Added: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java (rev 0)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculatorTest.java 2006-09-10 14:35:56 UTC (rev 143)
@@ -0,0 +1,444 @@
+package net.objectlab.kit.datecalc.common;
+
+import java.math.BigDecimal;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+public abstract class AbstractPeriodCountCalculatorTest<E> extends TestCase {
+
+ private static final String[][] ACT_365 = {
+ // name start end period dayDiff yearDiff
+ { "0D", "2006-08-08", "2006-08-08", "ACT_365", "0", "0.00" },
+ { "1D", "2006-08-08", "2006-08-09", "ACT_365", "1", "0.002740" },
+ { "1W", "2006-08-08", "2006-08-15", "ACT_365", "7", "0.019178" },
+ { "1M", "2006-08-08", "2006-09-08", "ACT_365", "31", "0.084932" },
+ { "3M", "2006-08-08", "2006-11-08", "ACT_365", "92", "0.252055" },
+ { "6M", "2006-08-08", "2007-02-08", "ACT_365", "184", "0.504110" },
+ { "9M", "2006-08-08", "2007-05-08", "ACT_365", "273", "0.747945" },
+ { "1Y", "2006-08-08", "2007-08-08", "ACT_365", "365", "1.000000" },
+ { "2Y", "2006-08-08", "2008-08-08", "ACT_365", "731", "2.002740" },
+ { "3Y", "2006-08-08", "2009-08-10", "ACT_365", "1098", "3.008219" },
+ { "4Y", "2006-08-08", "2010-08-09", "ACT_365", "1462", "4.005479" },
+ { "5Y", "2006-08-08", "2011-08-08", "ACT_365", "1826", "5.002740" },
+ { "7Y", "2006-08-08", "2013-08-08", "ACT_365", "2557", "7.005479" },
+ { "10Y", "2006-08-08", "2016-08-08", "ACT_365", "3653", "10.008219" },
+ { "15Y", "2006-08-08", "2021-08-09", "ACT_365", "5480", "15.013699" },
+ { "20Y", "2006-08-08", "2026-08-10", "ACT_365", "7307", "20.019178" },
+ { "30Y", "2006-08-08", "2036-08-08", "ACT_365", "10958", "30.021918" },
+ // leap year - funny date...
+ { "0D", "2008-02-29", "2008-02-29", "ACT_365", "0", "0.00" },
+ { "1D", "2008-02-29", "2008-03-03", "ACT_365", "3", "0.008219" },
+ { "1W", "2008-02-29", "2008-03-07", "ACT_365", "7", "0.019178" },
+ { "1M", "2008-02-29", "2008-03-31", "ACT_365", "31", "0.084932" },
+ { "3M", "2008-02-29", "2008-05-29", "ACT_365", "90", "0.246575" },
+ { "6M", "2008-02-29", "2008-08-29", "ACT_365", "182", "0.498630" },
+ { "9M", "2008-02-29", "2008-11-28", "ACT_365", "273", "0.747945" },
+ { "1Y", "2008-02-29", "2009-02-27", "ACT_365", "364", "0.997260" },
+ { "2Y", "2008-02-29", "2010-02-26", "ACT_365", "728", "1.994521" },
+ { "3Y", "2008-02-29", "2011-02-28", "ACT_365", "1095", "3.000000" },
+ { "4Y", "2008-02-29", "2012-02-29", "ACT_365", "1461", "4.002740" },
+ { "5Y", "2008-02-29", "2013-02-28", "ACT_365", "1826", "5.002740" },
+ { "7Y", "2008-02-29", "2015-02-27", "ACT_365", "2555", "7.000000" },
+ { "10Y", "2008-02-29", "2018-02-28", "ACT_365", "3652", "10.005479" },
+ { "15Y", "2008-02-29", "2023-02-28", "ACT_365", "5478", "15.008219" },
+ { "20Y", "2008-02-29", "2028-02-29", "ACT_365", "7305", "20.013699" },
+ { "30Y", "2008-02-29", "2038-02-26", "ACT_365", "10955", "30.013699" },
+ // start date end of month...
+ { "0D", "1998-12-31", "1998-12-31", "ACT_365", "0", "0.00" },
+ { "1D", "1998-12-31", "1999-01-01", "ACT_365", "1", "0.002740" },
+ { "1W", "1998-12-31", "1999-01-07", "ACT_365", "7", "0.019178" },
+ { "1M", "1998-12-31", "1999-01-29", "ACT_365", "29", "0.079452" },
+ { "3M", "1998-12-31", "1999-03-31", "ACT_365", "90", "0.246575" },
+ { "6M", "1998-12-31", "1999-06-30", "ACT_365", "181", "0.495890" },
+ { "9M", "1998-12-31", "1999-09-30", "ACT_365", "273", "0.747945" },
+ { "1Y", "1998-12-31", "1999-12-31", "ACT_365", "365", "1.000000" },
+ { "2Y", "1998-12-31", "2000-12-29", "ACT_365", "729", "1.997260" },
+ { "3Y", "1998-12-31", "2001-12-31", "ACT_365", "1096", "3.002740" },
+ { "4Y", "1998-12-31", "2002-12-31", "ACT_365", "1461", "4.002740" },
+ { "5Y", "1998-12-31", "2003-12-31", "ACT_365", "1826", "5.002740" },
+ { "7Y", "1998-12-31", "2005-12-30", "ACT_365", "2556", "7.002740" },
+ { "10Y", "1998-12-31", "2008-12-31", "ACT_365", "3653", "10.008219" },
+ { "15Y", "1998-12-31", "2013-12-31", "ACT_365", "5479", "15.010959" },
+ { "20Y", "1998-12-31", "2018-12-31", "ACT_365", "7305", "20.013699" },
+ { "30Y", "1998-12-31", "2028-12-29", "ACT_365", "10956", "30.016438" }
+ // end of set
+ };
+
+ private static final String[][] ACT_360 = {
+ // name start end period dayDiff yearDiff
+ { "0D", "2006-08-08", "2006-08-08", "ACT_360", "0", "0.00" },
+ { "1D", "2006-08-08", "2006-08-09", "ACT_360", "1", "0.002778" },
+ { "1W", "2006-08-08", "2006-08-15", "ACT_360", "7", "0.019444" },
+ { "1M", "2006-08-08", "2006-09-08", "ACT_360", "31", "0.086111" },
+ { "3M", "2006-08-08", "2006-11-08", "ACT_360", "92", "0.255556" },
+ { "6M", "2006-08-08", "2007-02-08", "ACT_360", "184", "0.511111" },
+ { "9M", "2006-08-08", "2007-05-08", "ACT_360", "273", "0.758333" },
+ { "1Y", "2006-08-08", "2007-08-08", "ACT_360", "365", "1.013889" },
+ { "2Y", "2006-08-08", "2008-08-08", "ACT_360", "731", "2.030556" },
+ { "3Y", "2006-08-08", "2009-08-10", "ACT_360", "1098", "3.050000" },
+ { "4Y", "2006-08-08", "2010-08-09", "ACT_360", "1462", "4.061111" },
+ { "5Y", "2006-08-08", "2011-08-08", "ACT_360", "1826", "5.072222" },
+ { "7Y", "2006-08-08", "2013-08-08", "ACT_360", "2557", "7.102778" },
+ { "10Y", "2006-08-08", "2016-08-08", "ACT_360", "3653", "10.147222" },
+ { "15Y", "2006-08-08", "2021-08-09", "ACT_360", "5480", "15.222222" },
+ { "20Y", "2006-08-08", "2026-08-10", "ACT_360", "7307", "20.297222" },
+ { "30Y", "2006-08-08", "2036-08-08", "ACT_360", "10958", "30.438889" },
+ // leap year - funny date...
+ { "0D", "2008-02-29", "2008-02-29", "ACT_360", "0", "0.00" },
+ { "1D", "2008-02-29", "2008-03-03", "ACT_360", "3", "0.008333" },
+ { "1W", "2008-02-29", "2008-03-07", "ACT_360", "7", "0.019444" },
+ { "1M", "2008-02-29", "2008-03-31", "ACT_360", "31", "0.086111" },
+ { "3M", "2008-02-29", "2008-05-29", "ACT_360", "90", "0.250000" },
+ { "6M", "2008-02-29", "2008-08-29", "ACT_360", "182", "0.505556" },
+ { "9M", "2008-02-29", "2008-11-28", "ACT_360", "273", "0.758333" },
+ { "1Y", "2008-02-29", "2009-02-27", "ACT_360", "364", "1.011111" },
+ { "2Y", "2008-02-29", "2010-02-26", "ACT_360", "728", "2.022222" },
+ { "3Y", "2008-02-29", "2011-02-28", "ACT_360", "1095", "3.041667" },
+ { "4Y", "2008-02-29", "2012-02-29", "ACT_360", "1461", "4.058333" },
+ { "5Y", "2008-02-29", "2013-02-28", "ACT_360", "1826", "5.072222" },
+ { "7Y", "2008-02-29", "2015-02-27", "ACT_360", "2555", "7.097222" },
+ { "10Y", "2008-02-29", "2018-02-28", "ACT_360", "3652", "10.144444" },
+ { "15Y", "2008-02-29", "2023-02-28", "ACT_360", "5478", "15.216667" },
+ { "20Y", "2008-02-29", "2028-02-29", "ACT_360", "7305", "20.291667" },
+ { "30Y", "2008-02-29", "2038-02-26", "ACT_360", "10955", "30.430556" },
+ // start date end of month...
+ { "0D", "1998-12-31", "1998-12-31", "ACT_360", "0", "0.00" },
+ { "1D", "1998-12-31", "1999-01-01", "ACT_360", "1", "0.002778" },
+ { "1W", "1998-12-31", "1999-01-07", "ACT_360", "7", "0.019444" },
+ { "1M", "1998-12-31", "1999-01-29", "ACT_360", "29", "0.080556" },
+ { "3M", "1998-12-31", "1999-03-31", "ACT_360", "90", "0.250000" },
+ { "6M", "1998-12-31", "1999-06-30", "ACT_360", "181", "0.502778" },
+ { "9M", "1998-12-31", "1999-09-30", "ACT_360", "273", "0.758333" },
+ { "1Y", "1998-12-31", "1999-12-31", "ACT_360", "365", "1.013889" },
+ { "2Y", "1998-12-31", "2000-12-29", "ACT_360", "729", "2.025000" },
+ { "3Y", "1998-12-31", "2001-12-31", "ACT_360", "1096", "3.044444" },
+ { "4Y", "1998-12-31", "2002-12-31", "ACT_360", "1461", "4.058333" },
+ { "5Y", "1998-12-31", "2003-12-31", "ACT_360", "1826", "5.072222" },
+ { "7Y", "1998-12-31", "2005-12-30", "ACT_360", "2556", "7.100000" },
+ { "10Y", "1998-12-31", "2008-12-31", "ACT_360", "3653", "10.147222" },
+ { "15Y", "1998-12-31", "2013-12-31", "ACT_360", "5479", "15.219444" },
+ { "20Y", "1998-12-31", "2018-12-31", "ACT_360", "7305", "20.291667" },
+ { "30Y", "1998-12-31", "2028-12-29", "ACT_360", "10956", "30.433333" }
+ // end of set
+ };
+
+// private static final String[][] ACT_ACT = {
+// { "my testies", "2006-08-08", "2006-11-08", "ACT_ACT", "92", "0" },
+// };
+
+ private static final String[][] ACT_ACT = {
+ // name start end period dayDiff yearDiff
+ { "0D", "2006-08-08", "2006-08-08", "ACT_ACT", "0", "0.00" },
+ { "1D", "2006-08-08", "2006-08-09", "ACT_ACT", "1", "0.00" },
+ { "1W", "2006-08-08", "2006-08-15", "ACT_ACT", "7", "0.00" },
+ { "1M", "2006-08-08", "2006-09-08", "ACT_ACT", "31", "0.00" },
+ { "3M", "2006-08-08", "2006-11-08", "ACT_ACT", "92", "0.00" },
+ { "6M", "2006-08-08", "2007-02-08", "ACT_ACT", "184", "0.504110" },
+ { "9M", "2006-08-08", "2007-05-08", "ACT_ACT", "273", "0.747945" },
+ { "1Y", "2006-08-08", "2007-08-08", "ACT_ACT", "365", "1.000000" },
+ { "2Y", "2006-08-08", "2008-08-08", "ACT_ACT", "731", "2.001093" },
+ { "3Y", "2006-08-08", "2009-08-10", "ACT_ACT", "1098", "3.005479" },
+ { "4Y", "2006-08-08", "2010-08-09", "ACT_ACT", "1462", "4.002740" },
+ { "5Y", "2006-08-08", "2011-08-08", "ACT_ACT", "1826", "5.00" },
+ { "7Y", "2006-08-08", "2013-08-08", "ACT_ACT", "2557", "7.00" },
+ { "10Y", "2006-08-08", "2016-08-08", "ACT_ACT", "3653", "10.001093" },
+ { "15Y", "2006-08-08", "2021-08-09", "ACT_ACT", "5480", "15.002740" },
+ { "20Y", "2006-08-08", "2026-08-10", "ACT_ACT", "7307", "20.005479" },
+ { "30Y", "2006-08-08", "2036-08-08", "ACT_ACT", "10958", "30.001093" },
+ // leap year - funny date...
+ { "0D", "2008-02-29", "2008-02-29", "ACT_ACT", "0", "0.00" },
+ { "1D", "2008-02-29", "2008-03-03", "ACT_ACT", "3", "0.00" },
+ { "1W", "2008-02-29", "2008-03-07", "ACT_ACT", "7", "0.00" },
+ { "1M", "2008-02-29", "2008-03-31", "ACT_ACT", "31", "0.00" },
+ { "3M", "2008-02-29", "2008-05-29", "ACT_ACT", "90", "0.00" },
+ { "6M", "2008-02-29", "2008-08-29", "ACT_ACT", "182", "0.00" },
+ { "9M", "2008-02-29", "2008-11-28", "ACT_ACT", "273", "0.00" },
+ { "1Y", "2008-02-29", "2009-02-27", "ACT_ACT", "364", "0.994962" },
+ { "2Y", "2008-02-29", "2010-02-26", "ACT_ACT", "728", "1.992222" },
+ { "3Y", "2008-02-29", "2011-02-28", "ACT_ACT", "1095", "2.997702" },
+ { "4Y", "2008-02-29", "2012-02-29", "ACT_ACT", "1461", "4.00" },
+ { "5Y", "2008-02-29", "2013-02-28", "ACT_ACT", "1826", "4.997702" },
+ { "7Y", "2008-02-29", "2015-02-27", "ACT_ACT", "2555", "6.994962" },
+ { "10Y", "2008-02-29", "2018-02-28", "ACT_ACT", "3652", "9.997702" },
+ { "15Y", "2008-02-29", "2023-02-28", "ACT_ACT", "5478", "14.997702" },
+ { "20Y", "2008-02-29", "2028-02-29", "ACT_ACT", "7305", "20.00" },
+ { "30Y", "2008-02-29", "2038-02-26", "ACT_ACT", "10955", "29.992222" },
+ // start date end of month...
+ { "0D", "1998-12-31", "1998-12-31", "ACT_ACT", "0", "0.00" },
+ { "1D", "1998-12-31", "1999-01-01", "ACT_ACT", "1", "0.002740" },
+ { "1W", "1998-12-31", "1999-01-07", "ACT_ACT", "7", "0.019178" },
+ { "1M", "1998-12-31", "1999-01-29", "ACT_ACT", "29", "0.079452" },
+ { "3M", "1998-12-31", "1999-03-31", "ACT_ACT", "90", "0.246575" },
+ { "6M", "1998-12-31", "1999-06-30", "ACT_ACT", "181", "0.495890" },
+ { "9M", "1998-12-31", "1999-09-30", "ACT_ACT", "273", "0.747945" },
+ { "1Y", "1998-12-31", "1999-12-31", "ACT_ACT", "365", "1.000000" },
+ { "2Y", "1998-12-31", "2000-12-29", "ACT_ACT", "729", "1.994543" },
+ { "3Y", "1998-12-31", "2001-12-31", "ACT_ACT", "1096", "3.00" },
+ { "4Y", "1998-12-31", "2002-12-31", "ACT_ACT", "1461", "4.00" },
+ { "5Y", "1998-12-31", "2003-12-31", "ACT_ACT", "1826", "5.00" },
+ { "7Y", "1998-12-31", "2005-12-30", "ACT_ACT", "2556", "6.997260" },
+ { "10Y", "1998-12-31", "2008-12-31", "ACT_ACT", "3653", "10.000007" },
+ { "15Y", "1998-12-31", "2013-12-31", "ACT_ACT", "5479", "15.00" },
+ { "20Y", "1998-12-31", "2018-12-31", "ACT_ACT", "7305", "20.00" },
+ { "30Y", "1998-12-31", "2028-12-29", "ACT_ACT", "10956", "29.994543" }
+ // end of set
+ };
+
+ private static final String[][] CONV_30_360 = {
+ // name start end period dayDiff yearDiff
+ { "0D", "2006-08-08", "2006-08-08", "CONV_30_360", "0", "0.00" },
+ { "1D", "2006-08-08", "2006-08-09", "CONV_30_360", "1", "0.002778" },
+ { "1W", "2006-08-08", "2006-08-15", "CONV_30_360", "7", "0.019444" },
+ { "1M", "2006-08-08", "2006-09-08", "CONV_30_360", "30", "0.083333" },
+ { "3M", "2006-08-08", "2006-11-08", "CONV_30_360", "90", "0.250000" },
+ { "6M", "2006-08-08", "2007-02-08", "CONV_30_360", "180", "0.500000" },
+ { "9M", "2006-08-08", "2007-05-08", "CONV_30_360", "270", "0.750000" },
+ { "1Y", "2006-08-08", "2007-08-08", "CONV_30_360", "360", "1.000000" },
+ { "2Y", "2006-08-08", "2008-08-08", "CONV_30_360", "720", "2.000000" },
+ { "3Y", "2006-08-08", "2009-08-10", "CONV_30_360", "1082", "3.005556" },
+ { "4Y", "2006-08-08", "2010-08-09", "CONV_30_360", "1441", "4.002778" },
+ { "5Y", "2006-08-08", "2011-08-08", "CONV_30_360", "1800", "5.000000" },
+ { "7Y", "2006-08-08", "2013-08-08", "CONV_30_360", "2520", "7.000000" },
+ { "10Y", "2006-08-08", "2016-08-08", "CONV_30_360", "3600", "10.000000" },
+ { "15Y", "2006-08-08", "2021-08-09", "CONV_30_360", "5401", "15.002778" },
+ { "20Y", "2006-08-08", "2026-08-10", "CONV_30_360", "7202", "20.005556" },
+ { "30Y", "2006-08-08", "2036-08-08", "CONV_30_360", "10800", "30.000000" },
+ // leap year - funny date...
+ { "0D", "2008-02-29", "2008-02-29", "CONV_30_360", "0", "0.00" },
+ { "1D", "2008-02-29", "2008-03-03", "CONV_30_360", "4", "0.011111" },
+ { "1W", "2008-02-29", "2008-03-07", "CONV_30_360", "8", "0.022222" },
+ { "1M", "2008-02-29", "2008-03-31", "CONV_30_360", "32", "0.088889" },
+ { "3M", "2008-02-29", "2008-05-29", "CONV_30_360", "90", "0.250000" },
+ { "6M", "2008-02-29", "2008-08-29", "CONV_30_360", "180", "0.500000" },
+ { "9M", "2008-02-29", "2008-11-28", "CONV_30_360", "269", "0.747222" },
+ { "1Y", "2008-02-29", "2009-02-27", "CONV_30_360", "358", "0.994444" },
+ { "2Y", "2008-02-29", "2010-02-26", "CONV_30_360", "717", "1.991667" },
+ { "3Y", "2008-02-29", "2011-02-28", "CONV_30_360", "1079", "2.997222" },
+ { "4Y", "2008-02-29", "2012-02-29", "CONV_30_360", "1440", "4.000000" },
+ { "5Y", "2008-02-29", "2013-02-28", "CONV_30_360", "1799", "4.997222" },
+ { "7Y", "2008-02-29", "2015-02-27", "CONV_30_360", "2518", "6.994444" },
+ { "10Y", "2008-02-29", "2018-02-28", "CONV_30_360", "3599", "9.997222" },
+ { "15Y", "2008-02-29", "2023-02-28", "CONV_30_360", "5399", "14.997222" },
+ { "20Y", "2008-02-29", "2028-02-29", "CONV_30_360", "7200", "20.000000" },
+ { "30Y", "2008-02-29", "2038-02-26", "CONV_30_360", "10797", "29.991667" },
+ // start date end of month...
+ { "0D", "1998-12-31", "1998-12-31", "CONV_30_360", "0", "0.000000" },
+ { "1D", "1998-12-31", "1999-01-01", "CONV_30_360", "1", "0.002778" },
+ { "1W", "1998-12-31", "1999-01-07", "CONV_30_360", "7", "0.019444" },
+ { "1M", "1998-12-31", "1999-01-29", "CONV_30_360", "29", "0.080556" },
+ { "3M", "1998-12-31", "1999-03-31", "CONV_30_360", "90", "0.250000" },
+ { "6M", "1998-12-31", "1999-06-30", "CONV_30_360", "180", "0.500000" },
+ { "9M", "1998-12-31", "1999-09-30", "CONV_30_360", "270", "0.750000" },
+ { "1Y", "1998-12-31", "1999-12-31", "CONV_30_360", "360", "1.000000" },
+ { "2Y", "1998-12-31", "2000-12-29", "CONV_30_360", "719", "1.997222" },
+ { "3Y", "1998-12-31", "2001-12-31", "CONV_30_360", "1080", "3.000000" },
+ { "4Y", "1998-12-31", "2002-12-31", "CONV_30_360", "1440", "4.000000" },
+ { "5Y", "1998-12-31", "2003-12-31", "CONV_30_360", "1800", "5.000000" },
+ { "7Y", "1998-12-31", "2005-12-30", "CONV_30_360", "2520", "7.000000" },
+ { "10Y", "1998-12-31", "2008-12-31", "CONV_30_360", "3600", "10.000000" },
+ { "15Y", "1998-12-31", "2013-12-31", "CONV_30_360", "5400", "15.000000" },
+ { "20Y", "1998-12-31", "2018-12-31", "CONV_30_360", "7200", "20.000000" },
+ { "30Y", "1998-12-31", "2028-12-29", "CONV_30_360", "10799", "29.997222" }
+ // end of set
+ };
+
+ private static final String[][] CONV_360E_ISDA = {
+ // name start end period dayDiff yearDiff
+ { "0D", "2006-08-08", "2006-08-08", "CONV_360E_ISDA", "0", "0.00" },
+ { "1D", "2006-08-08", "2006-08-09", "CONV_360E_ISDA", "1", "0.002778" },
+ { "1W", "2006-08-08", "2006-08-15", "CONV_360E_ISDA", "7", "0.019444" },
+ { "1M", "2006-08-08", "2006-09-08", "CONV_360E_ISDA", "30", "0.083333" },
+ { "3M", "2006-08-08", "2006-11-08", "CONV_360E_ISDA", "90", "0.250000" },
+ { "6M", "2006-08-08", "2007-02-08", "CONV_360E_ISDA", "180", "0.500000" },
+ { "9M", "2006-08-08", "2007-05-08", "CONV_360E_ISDA", "270", "0.750000" },
+ { "1Y", "2006-08-08", "2007-08-08", "CONV_360E_ISDA", "360", "1.000000" },
+ { "2Y", "2006-08-08", "2008-08-08", "CONV_360E_ISDA", "720", "2.000000" },
+ { "3Y", "2006-08-08", "2009-08-10", "CONV_360E_ISDA", "1082", "3.005556" },
+ { "4Y", "2006-08-08", "2010-08-09", "CONV_360E_ISDA", "1441", "4.002778" },
+ { "5Y", "2006-08-08", "2011-08-08", "CONV_360E_ISDA", "1800", "5.000000" },
+ { "7Y", "2006-08-08", "2013-08-08", "CONV_360E_ISDA", "2520", "7.000000" },
+ { "10Y", "2006-08-08", "2016-08-08", "CONV_360E_ISDA", "3600", "10.000000" },
+ { "15Y", "2006-08-08", "2021-08-09", "CONV_360E_ISDA", "5401", "15.002778" },
+ { "20Y", "2006-08-08", "2026-08-10", "CONV_360E_ISDA", "7202", "20.005556" },
+ { "30Y", "2006-08-08", "2036-08-08", "CONV_360E_ISDA", "10800", "30.000000" },
+ // leap year - funny date...
+ { "0D", "2008-02-29", "2008-02-29", "CONV_360E_ISDA", "0", "0.00" },
+ { "1D", "2008-02-29", "2008-03-03", "CONV_360E_ISDA", "4", "0.011111" },
+ { "1W", "2008-02-29", "2008-03-07", "CONV_360E_ISDA", "8", "0.022222" },
+ { "1M", "2008-02-29", "2008-03-31", "CONV_360E_ISDA", "31", "0.086111" },
+ { "3M", "2008-02-29", "2008-05-29", "CONV_360E_ISDA", "90", "0.250000" },
+ { "6M", "2008-02-29", "2008-08-29", "CONV_360E_ISDA", "180", "0.500000" },
+ { "9M", "2008-02-29", "2008-11-28", "CONV_360E_ISDA", "269", "0.747222" },
+ { "1Y", "2008-02-29", "2009-02-27", "CONV_360E_ISDA", "358", "0.994444" },
+ { "2Y", "2008-02-29", "2010-02-26", "CONV_360E_ISDA", "717", "1.991667" },
+ { "3Y", "2008-02-29", "2011-02-28", "CONV_360E_ISDA", "1079", "2.997222" },
+ { "4Y", "2008-02-29", "2012-02-29", "CONV_360E_ISDA", "1440", "4.000000" },
+ { "5Y", "2008-02-29", "2013-02-28", "CONV_360E_ISDA", "1799", "4.997222" },
+ { "7Y", "2008-02-29", "2015-02-27", "CONV_360E_ISDA", "2518", "6.994444" },
+ { "10Y", "2008-02-29", "2018-02-28", "CONV_360E_ISDA", "3599", "9.997222" },
+ { "15Y", "2008-02-29", "2023-02-28", "CONV_360E_ISDA", "5399", "14.997222" },
+ { "20Y", "2008-02-29", "2028-02-29", "CONV_360E_ISDA", "7200", "20.000000" },
+ { "30Y", "2008-02-29", "2038-02-26", "CONV_360E_ISDA", "10797", "29.991667" },
+ // start date end of month...
+ { "0D", "1998-12-31", "1998-12-31", "CONV_360E_ISDA", "0", "0.00" },
+ { "1D", "1998-12-31", "1999-01-01", "CONV_360E_ISDA", "1", "0.002778" },
+ { "1W", "1998-12-31", "1999-01-07", "CONV_360E_ISDA", "7", "0.019444" },
+ { "1M", "1998-12-31", "1999-01-29", "CONV_360E_ISDA", "29", "0.080556" },
+ { "3M", "1998-12-31", "1999-03-31", "CONV_360E_ISDA", "90", "0.250000" },
+ { "6M", "1998-12-31", "1999-06-30", "CONV_360E_ISDA", "180", "0.500000" },
+ { "9M", "1998-12-31", "1999-09-30", "CONV_360E_ISDA", "270", "0.750000" },
+ { "1Y", "1998-12-31", "1999-12-31", "CONV_360E_ISDA", "360", "1.000000" },
+ { "2Y", "1998-12-31", "2000-12-29", "CONV_360E_ISDA", "719", "1.997222" },
+ { "3Y", "1998-12-31", "2001-12-31", "CONV_360E_ISDA", "1080", "3.000000" },
+ { "4Y", "1998-12-31", "2002-12-31", "CONV_360E_ISDA", "1440", "4.000000" },
+ { "5Y", "1998-12-31", "2003-12-31", "CONV_360E_ISDA", "1800", "5.000000" },
+ { "7Y", "1998-12-31", "2005-12-30", "CONV_360E_ISDA", "2520", "7.000000" },
+ { "10Y", "1998-12-31", "2008-12-31", "CONV_360E_ISDA", "3600", "10.000000" },
+ { "15Y", "1998-12-31", "2013-12-31", "CONV_360E_ISDA", "5400", "15.000000" },
+ { "20Y", "1998-12-31", "2018-12-31", "CONV_360E_ISDA", "7200", "20.000000" },
+ { "30Y", "1998-12-31", "2028-12-29", "CONV_360E_ISDA", "10799", "29.997222" }
+ // end of set
+ };
+
+ private static final String[][] CONV_360E_ISMA = {
+ // name start end period dayDiff yearDiff
+ { "0D", "2006-08-08", "2006-08-08", "CONV_360E_ISMA", "0", "0.00" },
+ { "1D", "2006-08-08", "2006-08-09", "CONV_360E_ISMA", "1", "0.002778" },
+ { "1W", "2006-08-08", "2006-08-15", "CONV_360E_ISMA", "7", "0.019444" },
+ { "1M", "2006-08-08", "2006-09-08", "CONV_360E_ISMA", "30", "0.083333" },
+ { "3M", "2006-08-08", "2006-11-08", "CONV_360E_ISMA", "90", "0.250000" },
+ { "6M", "2006-08-08", "2007-02-08", "CONV_360E_ISMA", "180", "0.500000" },
+ { "9M", "2006-08-08", "2007-05-08", "CONV_360E_ISMA", "270", "0.750000" },
+ { "1Y", "2006-08-08", "2007-08-08", "CONV_360E_ISMA", "360", "1.000000" },
+ { "2Y", "2006-08-08", "2008-08-08", "CONV_360E_ISMA", "720", "2.000000" },
+ { "3Y", "2006-08-08", "2009-08-10", "CONV_360E_ISMA", "1082", "3.005556" },
+ { "4Y", "2006-08-08", "2010-08-09", "CONV_360E_ISMA", "1441", "4.002778" },
+ { "5Y", "2006-08-08", "2011-08-08", "CONV_360E_ISMA", "1800", "5.000000" },
+ { "7Y", "2006-08-08", "2013-08-08", "CONV_360E_ISMA", "2520", "7.000000" },
+ { "10Y", "2006-08-08", "2016-08-08", "CONV_360E_ISMA", "3600", "10.000000" },
+ { "15Y", "2006-08-08", "2021-08-09", "CONV_360E_ISMA", "5401", "15.002778" },
+ { "20Y", "2006-08-08", "2026-08-10", "CONV_360E_ISMA", "7202", "20.005556" },
+ { "30Y", "2006-08-08", "2036-08-08", "CONV_360E_ISMA", "10800", "30.000000" },
+ // leap year - funny date...
+ { "0D", "2008-02-29", "2008-02-29", "CONV_360E_ISMA", "0", "0.00" },
+ { "1D", "2008-02-29", "2008-03-03", "CONV_360E_ISMA", "4", "0.011111" },
+ { "1W", "2008-02-29", "2008-03-07", "CONV_360E_ISMA", "8", "0.022222" },
+ { "1M", "2008-02-29", "2008-03-31", "CONV_360E_ISMA", "31", "0.086111" },
+ { "3M", "2008-02-29", "2008-05-29", "CONV_360E_ISMA", "90", "0.250000" },
+ { "6M", "2008-02-29", "2008-08-29", "CONV_360E_ISMA", "180", "0.500000" },
+ { "9M", "2008-02-29", "2008-11-28", "CONV_360E_ISMA", "269", "0.747222" },
+ { "1Y", "2008-02-29", "2009-02-27", "CONV_360E_ISMA", "358", "0.994444" },
+ { "2Y", "2008-02-29", "2010-02-26", "CONV_360E_ISMA", "717", "1.991667" },
+ { "3Y", "2008-02-29", "2011-02-28", "CONV_360E_ISMA", "1079", "2.997222" },
+ { "4Y", "2008-02-29", "2012-02-29", "CONV_360E_ISMA", "1440", "4.000000" },
+ { "5Y", "2008-02-29", "2013-02-28", "CONV_360E_ISMA", "1799", "4.997222" },
+ { "7Y", "2008-02-29", "2015-02-27", "CONV_360E_ISMA", "2518", "6.994444" },
+ { "10Y", "2008-02-29", "2018-02-28", "CONV_360E_ISMA", "3599", "9.997222" },
+ { "15Y", "2008-02-29", "2023-02-28", "CONV_360E_ISMA", "5399", "14.997222" },
+ { "20Y", "2008-02-29", "2028-02-29", "CONV_360E_ISMA", "7200", "20.000000" },
+ { "30Y", "2008-02-29", "2038-02-26", "CONV_360E_ISMA", "10797", "29.991667" },
+ // start date end of month...
+ { "0D", "1998-12-31", "1998-12-31", "CONV_360E_ISMA", "0", "0.00" },
+ { "1D", "1998-12-31", "1999-01-01", "CONV_360E_ISMA", "1", "0.002778" },
+ { "1W", "1998-12-31", "1999-01-07", "CONV_360E_ISMA", "7", "0.019444" },
+ { "1M", "1998-12-31", "1999-01-29", "CONV_360E_ISMA", "29", "0.080556" },
+ { "3M", "1998-12-31", "1999-03-31", "CONV_360E_ISMA", "90", "0.250000" },
+ { "6M", "1998-12-31", "1999-06-30", "CONV_360E_ISMA", "180", "0.500000" },
+ { "9M", "1998-12-31", "1999-09-30", "CONV_360E_ISMA", "270", "0.750000" },
+ { "1Y", "1998-12-31", "1999-12-31", "CONV_360E_ISMA", "360", "1.000000" },
+ { "2Y", "1998-12-31", "2000-12-29", "CONV_360E_ISMA", "719", "1.997222" },
+ { "3Y", "1998-12-31", "2001-12-31", "CONV_360E_ISMA", "1080", "3.000000" },
+ { "4Y", "1998-12-31", "2002-12-31", "CONV_360E_ISMA", "1440", "4.000000" },
+ { "5Y", "1998-12-31", "2003-12-31", "CONV_360E_ISMA", "1800", "5.000000" },
+ { "7Y", "1998-12-31", "2005-12-30", "CONV_360E_ISMA", "2520", "7.000000" },
+ { "10Y", "1998-12-31", "2008-12-31", "CONV_360E_ISMA", "3600", "10.000000" },
+ { "15Y", "1998-12-31", "2013-12-31", "CONV_360E_ISMA", "5400", "15.000000" },
+ { "20Y", "1998-12-31", "2018-12-31", "CONV_360E_ISMA", "7200", "20.000000" },
+ { "30Y", "1998-12-31", "2028-12-29", "CONV_360E_ISMA", "10799", "29.997222" }
+ // end of set
+ };
+
+ private PeriodCountCalculator<E> cal;
+
+ public void setUp() {
+ cal = getPeriodCountCalculator();
+ }
+
+ public abstract PeriodCountCalculator<E> getPeriodCountCalculator();
+
+ public abstract E parseDate(String string);
+
+ public abstract E getDate();
+
+ public void testSanity() {
+ Assert.assertNotNull(cal);
+ }
+
+ public void testConv30EvIsma() {
+ runtests(CONV_360E_ISMA);
+ }
+
+ public void testConv30Ev360() {
+ runtests(CONV_360E_ISDA);
+ }
+
+ public void testConv30v360() {
+ runtests(CONV_30_360);
+ }
+
+ public void testAct365() {
+ runtests(ACT_365);
+ }
+
+ public void testAct360() {
+ runtests(ACT_360);
+ }
+
+ public void testActAct() {
+ runtests(ACT_ACT);
+ }
+
+
+ public void testUnsupportedType() {
+ Assert.assertNotNull(cal);
+
+ final PeriodCountBasis pcount = PeriodCountBasis.ACT_UST;
+ final E start = getDate();
+ final E end = getDate();
+
+ try {
+ cal.yearDiff(start, end, pcount);
+ Assert.fail("Should have refused the algo...");
+ } catch (final UnsupportedOperationException e) {
+ // ok
+ }
+
+ try {
+ cal.monthDiff(start, end, pcount);
+ Assert.fail("Should have refused the algo...");
+ } catch (final UnsupportedOperationException e) {
+ // ok
+ }
+ }
+
+ private void runtests(String[][] tests) {
+ for (final String[] test : tests) {
+ runtest(cal, test);
+ }
+ }
+
+ private void runtest(final PeriodCountCalculator<E> cal, final String[] test) {
+ final String name = test[0];
+ final E start = parseDate(test[1]);
+ final E end = parseDate(test[2]);
+ final PeriodCountBasis pcount = PeriodCountBasis.valueOf(test[3]);
+ final int dayDiff = Integer.parseInt(test[4]);
+ Assert.assertEquals(name + " Basis:" + pcount + " start:" + start + " dayDiff", dayDiff, cal.dayDiff(start, end, pcount));
+
+ final BigDecimal yearDiff = new BigDecimal(cal.yearDiff(start, end, pcount)).setScale(6, BigDecimal.ROUND_HALF_UP);
+ Assert.assertTrue(name + " Basis:" + pcount + " yearDiff expected:" + test[5] + " got:" + yearDiff, (new BigDecimal(
+ test[5])).compareTo(yearDiff) == 0);
+ }
+
+}
Modified: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java 2006-09-10 13:55:43 UTC (rev 142)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkCalendarPeriodCountCalculatorTest.java 2006-09-10 14:35:56 UTC (rev 143)
@@ -17,11 +17,11 @@
import java.util.Calendar;
-import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculator;
+import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculatorTest;
import net.objectlab.kit.datecalc.common.PeriodCountCalculator;
import net.objectlab.kit.datecalc.common.Utils;
-public class JdkCalendarPeriodCountCalculatorTest extends AbstractPeriodCountCalculator<Calendar> {
+public class JdkCalendarPeriodCountCalculatorTest extends AbstractPeriodCountCalculatorTest<Calendar> {
@Override
public PeriodCountCalculator<Calendar> getPeriodCountCalculator() {
Modified: trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java 2006-09-10 13:55:43 UTC (rev 142)
+++ trunk/datecalc-jdk/src/test/java/net/objectlab/kit/datecalc/jdk/JdkDatePeriodCountCalculatorTest.java 2006-09-10 14:35:56 UTC (rev 143)
@@ -17,11 +17,11 @@
import java.util.Date;
-import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculator;
+import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculatorTest;
import net.objectlab.kit.datecalc.common.PeriodCountCalculator;
import net.objectlab.kit.datecalc.common.Utils;
-public class JdkDatePeriodCountCalculatorTest extends AbstractPeriodCountCalculator<Date> {
+public class JdkDatePeriodCountCalculatorTest extends AbstractPeriodCountCalculatorTest<Date> {
@Override
public PeriodCountCalculator<Date> getPeriodCountCalculator() {
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java 2006-09-10 13:55:43 UTC (rev 142)
+++ trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculatorTest.java 2006-09-10 14:35:56 UTC (rev 143)
@@ -17,12 +17,12 @@
*/
package net.objectlab.kit.datecalc.joda;
-import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculator;
+import net.objectlab.kit.datecalc.common.AbstractPeriodCountCalculatorTest;
import net.objectlab.kit.datecalc.common.PeriodCountCalculator;
import org.joda.time.LocalDate;
-public class LocalDatePeriodCountCalculatorTest extends AbstractPeriodCountCalculator<LocalDate> {
+public class LocalDatePeriodCountCalculatorTest extends AbstractPeriodCountCalculatorTest<LocalDate> {
@Override
public PeriodCountCalculator<LocalDate> getPeriodCountCalculator() {
Modified: trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/YearMonthDayPeriodCountCalculatorTest.java
===================================================================
--- trunk/datecalc-joda/src/test/java/net/objectlab/kit/datecalc/joda/Yea...
[truncated message content] |
|
From: <be...@us...> - 2006-09-10 13:56:07
|
Revision: 142
http://svn.sourceforge.net/objectlabkit/?rev=142&view=rev
Author: benoitx
Date: 2006-09-10 06:55:43 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
Removed some tenor codes which aren't real ones..
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-10 13:45:41 UTC (rev 141)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-10 13:55:43 UTC (rev 142)
@@ -111,11 +111,18 @@
throw new IllegalArgumentException("Tenor cannot be null");
}
- // get to the Spot date first:
- moveByDays(daysToSpot);
+ final TenorCode tenorCode = tenor.getCode();
+ if (tenorCode != TenorCode.OVERNIGHT) {
+ // get to the Spot date first:
+ moveByDays(daysToSpot);
+ }
// move by tenor
- switch (tenor.getCode()) {
+ switch (tenorCode) {
+ case OVERNIGHT:
+ return moveByDays(1);
+ case SPOT:
+ return this;
case DAY:
return moveByDays(tenor.getUnits());
case WEEK:
@@ -171,8 +178,8 @@
&& holidayHandler != null
&& (holidayHandler.getType().equals(HolidayHandlerType.FORWARD) || holidayHandler.getType().equals(
HolidayHandlerType.MODIFIED_FOLLLOWING))) {
- throw new IllegalArgumentException("A " + HolidayHandlerType.MODIFIED_FOLLLOWING + " or "
- + HolidayHandlerType.FORWARD + " does not allow negative steps for moveByBusinessDays");
+ throw new IllegalArgumentException("A " + HolidayHandlerType.MODIFIED_FOLLLOWING + " or " + HolidayHandlerType.FORWARD
+ + " does not allow negative steps for moveByBusinessDays");
}
final int numberOfStepsLeft = Math.abs(businessDays);
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 13:45:41 UTC (rev 141)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/StandardTenor.java 2006-09-10 13:55:43 UTC (rev 142)
@@ -28,12 +28,6 @@
public static final Tenor OVERNIGHT = new Tenor(0, TenorCode.OVERNIGHT);
- public static final Tenor TOM_NEXT = new Tenor(0, TenorCode.TOMNEXT);
-
- public static final Tenor SPOT_NEXT = new Tenor(0, TenorCode.SPOTNEXT);
-
- public static final Tenor SPOT_WEEK = new Tenor(0, TenorCode.SPOTWEEK);
-
public static final Tenor T_1D = new Tenor(1, TenorCode.DAY);
public static final Tenor T_1W = new Tenor(1, TenorCode.WEEK);
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 13:45:41 UTC (rev 141)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/TenorCode.java 2006-09-10 13:55:43 UTC (rev 142)
@@ -16,8 +16,12 @@
package net.objectlab.kit.datecalc.common;
public enum TenorCode {
- OVERNIGHT("ON", false), TOMNEXT("TN", false), SPOT("SP", false), SPOTNEXT("SN", false), SPOTWEEK("SW", false), DAY("D", true), WEEK(
- "W", true), MONTH("M", true), YEAR("Y", true);
+ OVERNIGHT("ON", false),
+ // TOMNEXT("TN", false),
+ SPOT("SP", false),
+ // SPOTNEXT("SN", false),
+ // SPOTWEEK("SW", false),
+ DAY("D", true), WEEK("W", true), MONTH("M", true), YEAR("Y", true);
private final String code;
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java 2006-09-10 13:45:41 UTC (rev 141)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java 2006-09-10 13:55:43 UTC (rev 142)
@@ -66,8 +66,8 @@
final DateCalculator<E> cal = newDateCalculator("bla", holidayHandlerType);
cal.setNonWorkingDays(createUKHolidays());
cal.setStartDate(newDate(startDate));
- checkDate("Move start:" + startDate + " tenor:" + tenor + " daysToSpot:" + daysToSpot,
- cal.moveByTenor(tenor, daysToSpot), expectedDate);
+ checkDate("Move start:" + startDate + " tenor:" + tenor + " daysToSpot:" + daysToSpot, cal.moveByTenor(tenor, daysToSpot),
+ expectedDate);
}
}
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java 2006-09-10 13:45:41 UTC (rev 141)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/TenorTest.java 2006-09-10 13:55:43 UTC (rev 142)
@@ -48,9 +48,6 @@
public void testValidTenors() {
checkValidTenor("SP", false, TenorCode.SPOT, 0);
checkValidTenor("ON", false, TenorCode.OVERNIGHT, 0);
- checkValidTenor("SW", false, TenorCode.SPOTWEEK, 0);
- checkValidTenor("SN", false, TenorCode.SPOTNEXT, 0);
- checkValidTenor("TN", false, TenorCode.TOMNEXT, 0);
checkValidTenor("1D", true, TenorCode.DAY, 1);
checkValidTenor("0D", true, TenorCode.DAY, 0);
@@ -76,9 +73,6 @@
public void testToString() {
checkToString("SP");
checkToString("ON");
- checkToString("SW");
- checkToString("SN");
- checkToString("TN");
checkToString("1D");
checkToString("1W");
checkToString("1M");
@@ -90,10 +84,10 @@
public void testHashcode() {
final Set<Tenor> set = new HashSet<Tenor>();
set.add(StandardTenor.OVERNIGHT);
+ set.add(StandardTenor.T_1D);
set.add(StandardTenor.T_15Y);
- set.add(StandardTenor.SPOT_WEEK);
Assert.assertEquals("size", 3, set.size());
- Assert.assertTrue("Contains " + StandardTenor.SPOT_WEEK, set.contains(StandardTenor.SPOT_WEEK));
+ Assert.assertTrue("Contains " + StandardTenor.T_1D, set.contains(StandardTenor.T_1D));
Assert.assertTrue("Contains " + StandardTenor.OVERNIGHT, set.contains(StandardTenor.OVERNIGHT));
Assert.assertTrue("Contains " + StandardTenor.T_15Y, set.contains(StandardTenor.T_15Y));
Assert.assertEquals("Equals ", StandardTenor.T_15Y, StandardTenor.T_15Y);
@@ -102,7 +96,7 @@
public void testEquals() {
Assert.assertEquals("Equals ", StandardTenor.T_15Y, StandardTenor.T_15Y);
Assert.assertTrue("same", StandardTenor.OVERNIGHT.equals(StandardTenor.OVERNIGHT));
- Assert.assertFalse("not same", StandardTenor.OVERNIGHT.equals(StandardTenor.SPOT_NEXT));
+ Assert.assertFalse("not same", StandardTenor.OVERNIGHT.equals(StandardTenor.SPOT));
Assert.assertFalse("Different class", StandardTenor.OVERNIGHT.equals("Hello"));
Assert.assertFalse("Null", StandardTenor.OVERNIGHT.equals(null));
Assert.assertTrue("same", StandardTenor.T_10Y.equals(StandardTenor.T_10Y));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-10 13:46:00
|
Revision: 141
http://svn.sourceforge.net/objectlabkit/?rev=141&view=rev
Author: benoitx
Date: 2006-09-10 06:45:41 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
Ensure that formula works with double figures.
Modified Paths:
--------------
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 12:53:39 UTC (rev 140)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/LocalDatePeriodCountCalculator.java 2006-09-10 13:45:41 UTC (rev 141)
@@ -63,17 +63,18 @@
public double yearDiff(final LocalDate start, final LocalDate end, final PeriodCountBasis basis) {
double diff = 0.0;
+
if (basis == PeriodCountBasis.ACT_ACT) {
final int startYear = start.getYear();
final int endYear = end.getYear();
if (startYear != endYear) {
final LocalDate endOfStartYear = start.dayOfYear().withMaximumValue();
- final LocalDate startOfEndYear = end.dayOfYear().setCopy(1);
+ final LocalDate startOfEndYear = end.withDayOfYear(1);
final int diff1 = new Period(start, endOfStartYear, PeriodType.days()).getDays();
final int diff2 = new Period(startOfEndYear, end, PeriodType.days()).getDays();
- diff = (diff1 + 1.0) / start.dayOfYear().getMaximumValue() + (endYear - startYear - 1.0) + (diff2)
- / (double) end.dayOfYear().getMaximumValue();
+ diff = ((double) (diff1 + 1.0)) / (double) start.dayOfYear().getMaximumValue()
+ + ((double) (endYear - startYear - 1.0)) + ((double) (diff2)) / (double) end.dayOfYear().getMaximumValue();
}
} else if (basis == PeriodCountBasis.CONV_30_360 || basis == PeriodCountBasis.CONV_360E_ISDA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 12:53:50
|
Revision: 140
http://svn.sourceforge.net/objectlabkit/?rev=140&view=rev
Author: marchy
Date: 2006-09-10 05:53:39 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
added a null ACT_ACT - failing, and modularised the code repetition stuff
Modified Paths:
--------------
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java 2006-09-10 12:31:34 UTC (rev 139)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractPeriodCountCalculator.java 2006-09-10 12:53:39 UTC (rev 140)
@@ -297,6 +297,9 @@
// end of set
};
+ //TODO fill with values
+ private static final String[][] ACT_ACT = null;
+
private PeriodCountCalculator<E> cal;
public void setUp() {
@@ -309,46 +312,35 @@
public abstract E getDate();
- public void testConv30EvIsma() {
+ public void testSanity() {
Assert.assertNotNull(cal);
-
- for (final String[] test : CONV_360E_ISMA) {
- runtest(cal, test);
- }
}
+
+ public void testConv30EvIsma() {
+ runtests(CONV_360E_ISMA);
+ }
public void testConv30Ev360() {
- Assert.assertNotNull(cal);
-
- for (final String[] test : CONV_360E_ISDA) {
- runtest(cal, test);
- }
+ runtests(CONV_360E_ISDA);
}
public void testConv30v360() {
- Assert.assertNotNull(cal);
-
- for (final String[] test : CONV_30_360) {
- runtest(cal, test);
- }
+ runtests(CONV_30_360);
}
public void testAct365() {
- Assert.assertNotNull(cal);
-
- for (final String[] test : ACT_365) {
- runtest(cal, test);
- }
+ runtests(ACT_365);
}
public void testAct360() {
- Assert.assertNotNull(cal);
+ runtests(ACT_360);
+ }
- for (final String[] test : ACT_360) {
- runtest(cal, test);
- }
+ public void testActAct() {
+ runtests(ACT_ACT);
}
+
public void testUnsupportedType() {
Assert.assertNotNull(cal);
@@ -370,7 +362,13 @@
// ok
}
}
-
+
+ private void runtests(String[][] tests) {
+ for (final String[] test : tests) {
+ runtest(cal, test);
+ }
+ }
+
private void runtest(final PeriodCountCalculator<E> cal, final String[] test) {
final String name = test[0];
final E start = parseDate(test[1]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 12:31:53
|
Revision: 139
http://svn.sourceforge.net/objectlabkit/?rev=139&view=rev
Author: marchy
Date: 2006-09-10 05:31:34 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
removed comma from new file template for the root project
Modified Paths:
--------------
trunk/.settings/org.eclipse.jdt.ui.prefs
Modified: trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/.settings/org.eclipse.jdt.ui.prefs 2006-09-10 12:29:15 UTC (rev 138)
+++ trunk/.settings/org.eclipse.jdt.ui.prefs 2006-09-10 12:31:34 UTC (rev 139)
@@ -1,6 +1,6 @@
-#Sun Sep 10 14:02:26 CAT 2006
+#Sun Sep 10 14:14:38 CAT 2006
eclipse.preferences.version=1
formatter_profile=_objectlabkit
formatter_settings_version=10
internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * $$Id$$\r\n * \r\n * Copyright 2006 the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @TODO javadoc\r\n * \r\n * @author ${user}\r\n * @author $$LastChangedBy$$\r\n * @version $$Revision$$, $$Date$$\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * $$Id$$\r\n * \r\n * Copyright 2006 the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @TODO javadoc\r\n * \r\n * @author ${user}\r\n * @author $$LastChangedBy$$\r\n * @version $$Revision$$ $$Date$$\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2006-09-10 12:30:26
|
Revision: 138
http://svn.sourceforge.net/objectlabkit/?rev=138&view=rev
Author: marchy
Date: 2006-09-10 05:29:15 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
eclipse project properties for separate modules projects
Modified Paths:
--------------
trunk/datecalc-common/.classpath
trunk/datecalc-common/.settings/org.eclipse.jdt.ui.prefs
trunk/datecalc-jdk/.classpath
trunk/datecalc-jdk/.settings/org.eclipse.jdt.ui.prefs
trunk/datecalc-joda/.classpath
trunk/datecalc-joda/.settings/org.eclipse.jdt.ui.prefs
Added Paths:
-----------
trunk/datecalc-common/.settings/org.eclipse.jdt.core.prefs
trunk/datecalc-jdk/.settings/org.eclipse.jdt.core.prefs
trunk/datecalc-joda/.settings/org.eclipse.jdt.core.prefs
Modified: trunk/datecalc-common/.classpath
===================================================================
--- trunk/datecalc-common/.classpath 2006-09-10 12:04:30 UTC (rev 137)
+++ trunk/datecalc-common/.classpath 2006-09-10 12:29:15 UTC (rev 138)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry output="target/classes" kind="src" path="src/main/java"/>
<classpathentry output="target/test-classes" kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
Added: trunk/datecalc-common/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/datecalc-common/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/datecalc-common/.settings/org.eclipse.jdt.core.prefs 2006-09-10 12:29:15 UTC (rev 138)
@@ -0,0 +1,248 @@
+#Sun Sep 10 14:26:09 CAT 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=131
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
Modified: trunk/datecalc-common/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/datecalc-common/.settings/org.eclipse.jdt.ui.prefs 2006-09-10 12:04:30 UTC (rev 137)
+++ trunk/datecalc-common/.settings/org.eclipse.jdt.ui.prefs 2006-09-10 12:29:15 UTC (rev 138)
@@ -1,3 +1,5 @@
-#Sat Aug 26 11:32:21 CAT 2006
+#Sun Sep 10 14:26:09 CAT 2006
eclipse.preferences.version=1
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * $$Id$$\r\n * \r\n * Copyright 2006 the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n *\r\n * @author ${user}\r\n * @author $$LastChangedBy$$\r\n * @version $$Revision$$ $$Date$$\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+formatter_profile=_objectlabkit
+formatter_settings_version=10
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * $$Id$$\r\n * \r\n * Copyright 2006 the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @TODO javadoc\r\n *\r\n * @author ${user}\r\n * @author $$LastChangedBy$$\r\n * @version $$Revision$$ $$Date$$\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template></templates>
Modified: trunk/datecalc-jdk/.classpath
===================================================================
--- trunk/datecalc-jdk/.classpath 2006-09-10 12:04:30 UTC (rev 137)
+++ trunk/datecalc-jdk/.classpath 2006-09-10 12:29:15 UTC (rev 138)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry output="target/classes" kind="src" path="src/main/java"/>
+ <classpathentry output="target/test-classes" kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/datecalc-common"/>
Added: trunk/datecalc-jdk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/datecalc-jdk/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/datecalc-jdk/.settings/org.eclipse.jdt.core.prefs 2006-09-10 12:29:15 UTC (rev 138)
@@ -0,0 +1,248 @@
+#Sun Sep 10 14:26:16 CAT 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=131
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
Modified: trunk/datecalc-jdk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/datecalc-jdk/.settings/org.eclipse.jdt.ui.prefs 2006-09-10 12:04:30 UTC (rev 137)
+++ trunk/datecalc-jdk/.settings/org.eclipse.jdt.ui.prefs 2006-09-10 12:29:15 UTC (rev 138)
@@ -1,3 +1,5 @@
-#Sat Aug 26 11:32:42 CAT 2006
+#Sun Sep 10 14:26:16 CAT 2006
eclipse.preferences.version=1
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * $$Id$$\r\n * \r\n * Copyright 2006 the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n *\r\n * @author ${user}\r\n * @author $$LastChangedBy$$\r\n * @version $$Revision$$ $$Date$$\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="...
[truncated message content] |
|
From: <ma...@us...> - 2006-09-10 12:05:14
|
Revision: 137
http://svn.sourceforge.net/objectlabkit/?rev=137&view=rev
Author: marchy
Date: 2006-09-10 05:04:30 -0700 (Sun, 10 Sep 2006)
Log Message:
-----------
modified defaults for the eclipse project in the root folder
Modified Paths:
--------------
trunk/.classpath
trunk/.settings/org.eclipse.jdt.core.prefs
trunk/.settings/org.eclipse.jdt.ui.prefs
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2006-09-09 22:17:41 UTC (rev 136)
+++ trunk/.classpath 2006-09-10 12:04:30 UTC (rev 137)
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="datecalc-common/src/main/java"/>
- <classpathentry kind="src" path="datecalc-common/src/test/java"/>
- <classpathentry kind="src" path="datecalc-jdk/src/main/java"/>
- <classpathentry kind="src" path="datecalc-jdk/src/test/java"/>
- <classpathentry kind="src" path="datecalc-joda/src/main/java"/>
- <classpathentry kind="src" path="datecalc-joda/src/test/java"/>
+ <classpathentry output="datecalc-common/target/classes" kind="src" path="datecalc-common/src/main/java"/>
+ <classpathentry output="datecalc-common/target/test-classes" kind="src" path="datecalc-common/src/test/java"/>
+ <classpathentry output="datecalc-jdk/target/classes" kind="src" path="datecalc-jdk/src/main/java"/>
+ <classpathentry output="datecalc-jdk/target/test-classes" kind="src" path="datecalc-jdk/src/test/java"/>
+ <classpathentry output="datecalc-joda/target/classes" kind="src" path="datecalc-joda/src/main/java"/>
+ <classpathentry output="datecalc-joda/target/test-classes" kind="src" path="datecalc-joda/src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
<classpathentry kind="var" path="M2_REPO/joda-time/joda-time/1.3/joda-time-1.3.jar"/>
Modified: trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/.settings/org.eclipse.jdt.core.prefs 2006-09-09 22:17:41 UTC (rev 136)
+++ trunk/.settings/org.eclipse.jdt.core.prefs 2006-09-10 12:04:30 UTC (rev 137)
@@ -1,4 +1,4 @@
-#Fri Sep 08 16:51:16 CAT 2006
+#Sun Sep 10 14:02:26 CAT 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -10,3 +10,249 @@
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=8
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=131
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
Modified: trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/.settings/org.eclipse.jdt.ui.prefs 2006-09-09 22:17:41 UTC (rev 136)
+++ trunk/.settings/org.eclipse.jdt.ui.prefs 2006-09-10 12:04:30 UTC (rev 137)
@@ -1,4 +1,6 @@
-#Fri Sep 08 16:51:16 CAT 2006
+#Sun Sep 10 14:02:26 CAT 2006
eclipse.preferences.version=1
+formatter_profile=_objectlabkit
+formatter_settings_version=10
internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * $$Id$$\r\n * \r\n * Copyright 2006 the original author or authors.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @TODO javadoc\r\n * \r\n * @author ${user}\r\n * @author $$LastChangedBy$$\r\n * @version $$Revision$$, $$Date$$\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-09 22:18:11
|
Revision: 136
http://svn.sourceforge.net/objectlabkit/?rev=136&view=rev
Author: benoitx
Date: 2006-09-09 15:17:41 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
tidy up,add link to statsvn.
Modified Paths:
--------------
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java
trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaExcelDateUtil.java
trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java
trunk/src/site/navigation.xml
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-09 16:31:12 UTC (rev 135)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java 2006-09-09 22:17:41 UTC (rev 136)
@@ -100,7 +100,9 @@
* handler and not count towards the number of days to move.
*
* @param businessDays
- * @param daysToSpot number of days to "spot" days, this can vary from one market to the other.
+ * @param daysToSpot
+ * number of days to "spot" days, this can vary from one market
+ * to the other.
* @return the current businessCalendar (so one can do
* calendar.moveByTenor(StandardTenor.T_2M).getCurrentBusinessDate();)
*/
@@ -108,7 +110,7 @@
if (tenor == null) {
throw new IllegalArgumentException("Tenor cannot be null");
}
-
+
// get to the Spot date first:
moveByDays(daysToSpot);
Modified: trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java
===================================================================
--- trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java 2006-09-09 16:31:12 UTC (rev 135)
+++ trunk/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/DateCalculator.java 2006-09-09 22:17:41 UTC (rev 136)
@@ -183,13 +183,17 @@
DateCalculator<E> combine(DateCalculator<E> calculator);
/**
- * Move the current date by a given tenor, please note that all tenors are relative to
- * the SPOT day which is a number of days from the current date. This method therefore,
- * calculates the SPOT day first, moves it if it falls on a holiday and then goes to the
- * calculated day according to the Tenor.
+ * Move the current date by a given tenor, please note that all tenors are
+ * relative to the SPOT day which is a number of days from the current date.
+ * This method therefore, calculates the SPOT day first, moves it if it
+ * falls on a holiday and then goes to the calculated day according to the
+ * Tenor.
*
- * @param tenor the Tenor to reach.
- * @param daysToSpot number of days to "spot" days, this can vary from one market to the other.
+ * @param tenor
+ * the Tenor to reach.
+ * @param daysToSpot
+ * number of days to "spot" days, this can vary from one market
+ * to the other.
* @return the current DateCalculator
*/
DateCalculator<E> moveByTenor(final Tenor tenor, final int daysToSpot);
Modified: trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java
===================================================================
--- trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java 2006-09-09 16:31:12 UTC (rev 135)
+++ trunk/datecalc-common/src/test/java/net/objectlab/kit/datecalc/common/AbstractDateTestCase.java 2006-09-09 22:17:41 UTC (rev 136)
@@ -54,6 +54,7 @@
/**
* Based on UK Holidays for Aug 2006.
+ *
* @param startDate
* @param tenor
* @param daysToSpot
@@ -61,7 +62,7 @@
* @param holidayHandlerType
*/
protected void checkMoveByTenor(final String startDate, final Tenor tenor, final int daysToSpot, final String expectedDate,
- final String holidayHandlerType) {
+ final String holidayHandlerType) {
final DateCalculator<E> cal = newDateCalculator("bla", holidayHandlerType);
cal.setNonWorkingDays(createUKHolidays());
cal.setStartDate(newDate(startDate));
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaExcelDateUtil.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaExcelDateUtil.java 2006-09-09 16:31:12 UTC (rev 135)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/JodaExcelDateUtil.java 2006-09-09 22:17:41 UTC (rev 136)
@@ -35,7 +35,8 @@
*/
public final class JodaExcelDateUtil {
- private JodaExcelDateUtil() {}
+ private JodaExcelDateUtil() {
+ }
public static LocalDate getLocalDate(final double date, final boolean use1904windowing) {
final Date javaDate = ExcelDateUtil.getJavaDate(date, use1904windowing);
Modified: trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java
===================================================================
--- trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java 2006-09-09 16:31:12 UTC (rev 135)
+++ trunk/datecalc-joda/src/main/java/net/objectlab/kit/datecalc/joda/YearMonthDayKitCalculatorsFactory.java 2006-09-09 22:17:41 UTC (rev 136)
@@ -17,9 +17,9 @@
import net.objectlab.kit.datecalc.common.AbstractKitCalculatorsFactory;
import net.objectlab.kit.datecalc.common.DateCalculator;
-import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
import net.objectlab.kit.datecalc.common.HolidayHandlerType;
import net.objectlab.kit.datecalc.common.IMMDateCalculator;
+import net.objectlab.kit.datecalc.common.KitCalculatorsFactory;
import net.objectlab.kit.datecalc.common.PeriodCountCalculator;
import org.joda.time.YearMonthDay;
Modified: trunk/src/site/navigation.xml
===================================================================
--- trunk/src/site/navigation.xml 2006-09-09 16:31:12 UTC (rev 135)
+++ trunk/src/site/navigation.xml 2006-09-09 22:17:41 UTC (rev 136)
@@ -18,6 +18,7 @@
<item name="Holiday Handling" href="algo.html" />
<item name="Tenor Handling" href="tenor.html" />
<item name="JavaDoc" class="newWindow" target="_new" href="apidocs/index.html" />
+ <item name="Stat SVN" class="newWindow" target="_new" href="statsvn/index.html" />
</menu>
<!--
<menu name="Related Projects">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2006-09-09 16:31:35
|
Revision: 135
http://svn.sourceforge.net/objectlabkit/?rev=135&view=rev
Author: benoitx
Date: 2006-09-09 09:31:12 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
Added a couple of links (QALab and ObjectLab)
Modified Paths:
--------------
trunk/datecalc-jdk/qalab.xml
trunk/datecalc-joda/qalab.xml
trunk/src/site/navigation.xml
Modified: trunk/datecalc-jdk/qalab.xml
===================================================================
--- trunk/datecalc-jdk/qalab.xml 2006-09-09 15:01:14 UTC (rev 134)
+++ trunk/datecalc-jdk/qalab.xml 2006-09-09 16:31:12 UTC (rev 135)
@@ -60,8 +60,8 @@
<summaryresult date="2006-09-06" filecount="21" statvalue="89" type="cobertura-branch"/>
<summaryresult date="2006-09-07" filecount="19" statvalue="93" type="cobertura-line"/>
<summaryresult date="2006-09-07" filecount="19" statvalue="92" type="cobertura-branch"/>
- <summaryresult date="2006-09-09" filecount="17" statvalue="93" type="cobertura-line"/>
- <summaryresult date="2006-09-09" filecount="17" statvalue="92" type="cobertura-branch"/>
+ <summaryresult date="2006-09-09" filecount="17" statvalue="95" type="cobertura-line"/>
+ <summaryresult date="2006-09-09" filecount="17" statvalue="95" type="cobertura-branch"/>
</summary>
<file id="net_objectlab_kit_datecalc_jdk_package.html" path="net/objectlab/kit/datecalc/jdk/package.html">
<result date="2006-08-08" statvalue="1" type="checkstyle"/>
@@ -482,7 +482,7 @@
<file id="net_objectlab_kit_datecalc_jdk_DateForwardHandler.java" path="net/objectlab/kit/datecalc/jdk/DateForwardHandler.java">
<result date="2006-09-07" statvalue="90" type="cobertura-line"/>
<result date="2006-09-07" statvalue="100" type="cobertura-branch"/>
- <result date="2006-09-09" statvalue="90" type="cobertura-line"/>
+ <result date="2006-09-09" statvalue="100" type="cobertura-line"/>
<result date="2006-09-09" statvalue="100" type="cobertura-branch"/>
</file>
<file
@@ -501,8 +501,8 @@
</file>
<file
id="net_objectlab_kit_datecalc_jdk_CalendarDateCalculator.java" path="net/objectlab/kit/datecalc/jdk/CalendarDateCalculator.java">
- <result date="2006-09-09" statvalue="77" type="cobertura-line"/>
- <result date="2006-09-09" statvalue="71" type="cobertura-branch"/>
+ <result date="2006-09-09" statvalue="100" type="cobertura-line"/>
+ <result date="2006-09-09" statvalue="100" type="cobertura-branch"/>
</file>
<file
id="net_objectlab_kit_datecalc_jdk_CalendarIMMDateCalculator.java" path="net/objectlab/kit/datecalc/jdk/CalendarIMMDateCalculator.java">
Modified: trunk/datecalc-joda/qalab.xml
===================================================================
--- trunk/datecalc-joda/qalab.xml 2006-09-09 15:01:14 UTC (rev 134)
+++ trunk/datecalc-joda/qalab.xml 2006-09-09 16:31:12 UTC (rev 135)
@@ -63,8 +63,8 @@
<summaryresult date="2006-09-06" filecount="19" statvalue="96" type="cobertura-branch"/>
<summaryresult date="2006-09-07" filecount="19" statvalue="94" type="cobertura-line"/>
<summaryresult date="2006-09-07" filecount="19" statvalue="93" type="cobertura-branch"/>
- <summaryresult date="2006-09-09" filecount="19" statvalue="94" type="cobertura-line"/>
- <summaryresult date="2006-09-09" filecount="19" statvalue="93" type="cobertura-branch"/>
+ <summaryresult date="2006-09-09" filecount="19" statvalue="96" type="cobertura-line"/>
+ <summaryresult date="2006-09-09" filecount="19" statvalue="96" type="cobertura-branch"/>
</summary>
<file id="net_objectlab_kit_datecalc_joda_package.html" path="net/objectlab/kit/datecalc/joda/package.html">
<result date="2006-08-08" statvalue="1" type="checkstyle"/>
@@ -397,8 +397,8 @@
<result date="2006-09-06" statvalue="100" type="cobertura-branch"/>
<result date="2006-09-07" statvalue="76" type="cobertura-line"/>
<result date="2006-09-07" statvalue="71" type="cobertura-branch"/>
- <result date="2006-09-09" statvalue="76" type="cobertura-line"/>
- <result date="2006-09-09" statvalue="71" type="cobertura-branch"/>
+ <result date="2006-09-09" statvalue="100" type="cobertura-line"/>
+ <result date="2006-09-09" statvalue="100" type="cobertura-branch"/>
</file>
<file
id="net_objectlab_kit_datecalc_joda_LocalDateForwardHandler.java" path="net/objectlab/kit/datecalc/joda/LocalDateForwardHandler.java">
@@ -527,7 +527,7 @@
<result date="2006-09-06" statvalue="100" type="cobertura-branch"/>
<result date="2006-09-07" statvalue="85" type="cobertura-line"/>
<result date="2006-09-07" statvalue="100" type="cobertura-branch"/>
- <result date="2006-09-09" statvalue="85" type="cobertura-line"/>
+ <result date="2006-09-09" statvalue="92" type="cobertura-line"/>
<result date="2006-09-09" statvalue="100" type="cobertura-branch"/>
</file>
<file
Modified: trunk/src/site/navigation.xml
===================================================================
--- trunk/src/site/navigation.xml 2006-09-09 15:01:14 UTC (rev 134)
+++ trunk/src/site/navigation.xml 2006-09-09 16:31:12 UTC (rev 135)
@@ -31,7 +31,10 @@
</menu>
-->
<search/>
-
+ <menu name="Links">
+ <item name="QALab" href="http://qalab.sourceforge.net/" />
+ <item name="ObjectLab" href="http://www.objectlab.co.uk" />
+ </menu>
<footer>
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|