All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ucar.nc2.units.TimeUnit Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 1998-2018 John Caron and University Corporation for Atmospheric Research/Unidata
 * See LICENSE for license information.
 */

package ucar.nc2.units;

import ucar.unidata.util.Format;
import ucar.units.ConversionException;
import ucar.units.UnitException;

import java.util.StringTokenizer;
import java.util.Date;
import java.util.Calendar;

/**
 * Handles Units that are time durations, eg in seconds, hours, days, years.
 * It keeps track of the original unit name, rather than converting to canonical "seconds".
 * The unit name never changes, but the value may.
 * 

* This is a wrapper around ucar.units. * The underlying ucar.units.Unit always has a value of "1.0", ie is a base unit. * * @author John Caron */ public class TimeUnit extends SimpleUnit { private double value; private double factor = 1.0; private String unitString; //private Unit uu; /** * Constructor from a String. * @param text [value]





© 2015 - 2024 Weber Informatics LLC | Privacy Policy