| Home >> All >> org >> jfree >> [ date Javadoc ] |
| | org.jfree.date.junit.* (4) |
org.jfree.date: Javadoc index of package org.jfree.date.
Package Samples:
org.jfree.date.junit: Date classes.
Classes:
SerialDate: An abstract class that defines our requirements for manipulating dates, without tying down a particular implementation. Requirement 1 : match at least what Excel does for dates; Requirement 2 : class is immutable; Why not just use java.util.Date? We will, when it makes sense. At times, java.util.Date can be *too* precise - it represents an instant in time, accurate to 1/1000th of a second (with the date itself depending on the time-zone). Sometimes we just want to represent a particular day (e.g. 21 January 2015) without concerning ourselves about the time of day, or the time-zone, or anything ...
SpreadsheetDate: Represents a date using an integer, in a similar fashion to the implementation in Microsoft Excel. The range of dates supported is 1-Jan-1900 to 31-Dec-9999. Be aware that there is a deliberate bug in Excel that recognises the year 1900 as a leap year when in fact it is not a leap year. You can find more information on the Microsoft website in article Q181370: http://support.microsoft.com/support/kb/articles/Q181/3/70.asp Excel uses the convention that 1-Jan-1900 = 1. This class uses the convention 1-Jan-1900 = 2. The result is that the day number in this class will be different to the Excel figure ...
SerialDateUtilities: A utility class that provides a number of useful methods (some static). Many of these are used in the implementation of the day-count convention classes. I recognise some limitations in this implementation: [1] some of the methods assume that the default Calendar is a GregorianCalendar (used mostly to determine leap years) - so the code won’t work if some other Calendar is the default. I'm not sure how to handle this properly? [2] a whole bunch of static methods isn't very object-oriented - but I couldn't think of a good way to extend the Date and Calendar classes to add the functions I required, ...
EasterSundayRule: An annual date rule for Easter (Sunday). The algorithm used here was obtained from a Calendar FAQ which can be found at: http://www.tondering.dk/claus/calendar.html . It is based on an algorithm by Oudin (1940) and quoted in "Explanatory Supplement to the Astronomical Almanac", P. Kenneth Seidelmann, editor.
RelativeDayOfWeekRule: An annual date rule that returns a date for each year based on (a) a reference rule; (b) a day of the week; and (c) a selection parameter (SerialDate.PRECEDING, SerialDate.NEAREST, SerialDate.FOLLOWING). For example, Good Friday can be specified as 'the Friday PRECEDING Easter Sunday'.
MonthConstants: Useful constants for months. Note that these are NOT equivalent to the constants defined by java.util.Calendar (where JANUARY=0 and DECEMBER=11). Used by the SerialDate and RegularTimePeriod classes.
DayAndMonthRule: An annual date rule where the generated date always falls on the same day and month each year. An example is ANZAC Day in Australia and New Zealand: it is observed on 25 April of every year.
AnnualDateRule: The base class for all 'annual' date rules: that is, rules for generating one date for any given year. One example is Easter Sunday (which can be calculated using published algorithms).
DayOfWeekInMonthRule: An annual date rule that specifies the nth day of the week in a given month (for example, the third Wednesday in June, or the last Friday in November).
SerialDateTests: Some JUnit tests for the org.jfree.date.SerialDate class.
DatePackageTests: A test suite for the org.jfree.date package.
SerialDateUtilitiesTests: Some tests for the SerialDateUtilities class.
SpreadsheetDateTests: Tests for the SpreadsheetDate class.
DateUtilities: Some useful date methods.
| Home | Contact Us | Privacy Policy | Terms of Service |