Android Year Offset Get deltaTimeCurrentCentury(int year)

Here you can find the source of deltaTimeCurrentCentury(int year)

Description

Calculates the difference between the Universal Time and the Terrestrial Time (also known as Dynamical Time) given a year within the 21st century.

License

Open Source License

Parameter

Parameter Description
year year within the current century.

Declaration

public static double deltaTimeCurrentCentury(int year) 

Method Source Code

//package com.java2s;
/*/*www  . j  ava2s .  c o  m*/
 * Copyright (C) 2011-2012 Inaki Ortiz de Landaluce Saiz
 * 
 * This program is free software: you can redistribute it 
 * and/or modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation, either 
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public 
 * License along with this program. If not, see 
 * <http://www.gnu.org/licenses/>
 */

public class Main {
    /**
     * Calculates the difference between the Universal Time and the Terrestrial
     * Time (also known as Dynamical Time) given a year within the 21st century.
     * The exact value of such difference can be deduced only from observations.
     * However an approximate value can be obtained through interpolation by
     * means of an expression due to Chapront and Francou and issued by the
     * Bureau des Longitudes in Paris on December 1977.
     * 
     * @param year
     *            year within the current century.
     */
    public static double deltaTimeCurrentCentury(int year) {
        // calculate time measured in centuries from epoch 2000.0
        double t = (double) (year - 2000) / 100;
        return (102 + 102 * t + 25.3 * t * t + (year - 2100) * 0.37);
    }
}

Related

  1. hasYearPassed(int year)
  2. yearOffset(Date date, int offset)
  3. getOneYearAgo()
  4. yearDays(int y)