Class Dates


  • public class Dates
    extends java.lang.Object
    Utilities for dealing with dates.
    Author:
    Garret Wilson
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.Date EXCEL_EPOCH_DATE
      The origin of Microsoft Excel date serial values, 31 December 1899.
    • Constructor Summary

      Constructors 
      Constructor Description
      Dates()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double toExcelDate​(java.util.Date date)
      Converts a Java date to Microsoft Excel representation, defined as the fractional number of days past 31 December 1899.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EXCEL_EPOCH_DATE

        protected static final java.util.Date EXCEL_EPOCH_DATE
        The origin of Microsoft Excel date serial values, 31 December 1899.
    • Constructor Detail

      • Dates

        public Dates()
    • Method Detail

      • toExcelDate

        public static double toExcelDate​(java.util.Date date)
        Converts a Java date to Microsoft Excel representation, defined as the fractional number of days past 31 December 1899.
        Parameters:
        date - The date to convert.
        Returns:
        A Microsoft Excel representation