001/* 002 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit. 003 * 004 * Based in London, we are world leaders in the design and development 005 * of bespoke applications for the securities financing markets. 006 * 007 * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> 008 * ___ _ _ _ _ _ 009 * / _ \| |__ (_) ___ ___| |_| | __ _| |__ 010 * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ 011 * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | 012 * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ 013 * |__/ 014 * 015 * www.ObjectLab.co.uk 016 * 017 * $Id$ 018 * 019 * Copyright 2006 the original author or authors. 020 * 021 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 022 * use this file except in compliance with the License. You may obtain a copy of 023 * the License at 024 * 025 * http://www.apache.org/licenses/LICENSE-2.0 026 * 027 * Unless required by applicable law or agreed to in writing, software 028 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 029 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 030 * License for the specific language governing permissions and limitations under 031 * the License. 032 */ 033package net.objectlab.kit.datecalc.common; 034 035/** 036 * Define a series of standard way to handle holidays. 037 * 038 * @author Benoit Xhenseval 039 * 040 */ 041public final class HolidayHandlerType { 042 043 /** 044 * A Forward handler will move the date forward if it falls on a non working 045 * day. 046 */ 047 public static final String FORWARD = "forward"; 048 049 /** 050 * A backward handler will move the date backward if it falls on a non 051 * working day. 052 */ 053 public static final String BACKWARD = "backward"; 054 055 // ----------------------------------------------------------------------- 056 // 057 // ObjectLab, world leaders in the design and development of bespoke 058 // applications for the securities financing markets. 059 // www.ObjectLab.co.uk 060 // 061 // ----------------------------------------------------------------------- 062 063 /** 064 * A modified following handler will move the date forward if it falls on a 065 * non working day BUT, if the new date falls into another month, it will 066 * revert to moving backward until it finds a working day. 067 */ 068 public static final String MODIFIED_FOLLOWING = "modifiedFollowing"; 069 070 /** 071 * A modified preceding handler will move the date backward if it falls on 072 * a non working day BUT, if the new date falls into another month, it will 073 * revert to moving forward until it finds a working day. 074 */ 075 public static final String MODIFIED_PRECEDING = "modifiedPreceding"; 076 077 /** 078 * A handler that moves the date forward unless the increment is negative 079 * (eg moveByDays(-2)) in which case it behaves like a Backward handler. 080 */ 081 public static final String FORWARD_UNLESS_MOVING_BACK = "forwardUnlessMovingBack"; 082 083 private HolidayHandlerType() { 084 } 085} 086 087/* 088 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit. 089 * 090 * Based in London, we are world leaders in the design and development 091 * of bespoke applications for the securities financing markets. 092 * 093 * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a> 094 * ___ _ _ _ _ _ 095 * / _ \| |__ (_) ___ ___| |_| | __ _| |__ 096 * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ 097 * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | 098 * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ 099 * |__/ 100 * 101 * www.ObjectLab.co.uk 102 */