uk.ac.starlink.pal

## Class mjDate

- java.lang.Object
- - uk.ac.starlink.pal.mjDate

-     public class mjDate
      extends java.lang.Object

  Modified Julian Date

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `mjDate(int yr, int diy)` Modified Julian Date
    `mjDate(int yr, int mn, int d)` Modified Julian Date
    `mjDate(int yr, int mn, int d, double fract)` Modified Julian Date

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDay()` Get day
    `int` | `getDayinYear()` Get day in year
    `double` | `getFraction()` Get fraction
    `int` | `getFraction(int n)` Get fraction as integer number of places.
    `int` | `getMonth()` Get month
    `int` | `getYear()` Get year
    `java.lang.String` | `toString()` return date as string
    `java.lang.String` | `toString(int n)` return date as string to required precision

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### mjDate

          public mjDate(int yr,
                        int mn,
                        int d)
                 throws palError

      Modified Julian Date
      Parameters:
        `yr` - Year
        `mn` - Month
        `d` - Day
      Throws:
        `palError`

    - #### mjDate

          public mjDate(int yr,
                        int mn,
                        int d,
                        double fract)
                 throws palError

      Modified Julian Date
      Parameters:
        `yr` - Year
        `mn` - Month
        `d` - Day
        `fract` - Fraction of day
      Throws:
        `palError`

    - #### mjDate

          public mjDate(int yr,
                        int diy)
                 throws palError

      Modified Julian Date
      Parameters:
        `yr` - Year
        `diy` - Day in year
      Throws:
        `palError`

  - ### Method Detail

    - #### getYear

          public int getYear()

      Get year
      Returns:
        Year

    - #### getMonth

          public int getMonth()

      Get month
      Returns:
        Month

    - #### getDay

          public int getDay()

      Get day
      Returns:
        Day

    - #### getFraction

          public int getFraction(int n)

      Get fraction as integer number of places.
      Returns:
        fraction * 10^n

    - #### getFraction

          public double getFraction()

      Get fraction
      Returns:
        Fraction of day

    - #### getDayinYear

          public int getDayinYear()

      Get day in year
      Returns:
        Day in year

    - #### toString

          public java.lang.String toString(int n)

      return date as string to required precision
      Parameters:
        `n` - Number of decimal places in fraction
      Returns:
        Date in form YYYY MM DD.F

    - #### toString

          public java.lang.String toString()

      return date as string
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Date in form dd/mm/yyyy

Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.