Module omix.api
Package omix.lang

Class Date

java.lang.Object
omix.lang.Date
All Implemented Interfaces:
Serializable

public final class Date
extends Object
implements Serializable
This class represents date in the Omix network diagrams.
Author:
Dr. Peter Droste, Omix Visualization
See Also:
Serialized Form
  • Constructor Details

    • Date

      @ConstructorProperties({"year","month","day"}) public Date​(int year, int month, int day)
      creates a date with the given year, month (1-12) and day (1-31)
      Parameters:
      year - year
      month - month
      day - day
    • Date

      @ConstructorProperties("time") public Date​(long time)
      creates a date with the absolute date representation
      Parameters:
      time - time
    • Date

      @ConstructorProperties("date") public Date​(Date date)
      creates a date upon a java standard date format.
      Parameters:
      date - java date
  • Method Details

    • getDay

      public int getDay()
      Returns:
      the day of this date
    • getMonth

      public int getMonth()
      Returns:
      the month of this date
    • getYear

      public int getYear()
      Returns:
      the year of this date
    • getValue

      @OVLInaccessible public long getValue()
      Returns:
      the absolute date value
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the date as YY-MM-DD
      See Also:
      Object.toString()
    • toString

      public String toString​(String format)
      Parameters:
      format - a format which has to contain YYYY for year, MM for month and DD for day
      Returns:
      a string representation of the date according the submitted format