Please report issues and contribute improvements on GitHub!

Namespace org.accordproject.time (v2.0)

Found 6 declarations!

Download CTO Download UML Download JSON Schema Download Typescript Download Java Download Go Download XML Schema

Declared Types


import org.accordproject.time.Month from https://models.accordproject.org/v2.0/time.cto
import org.accordproject.time.Day from https://models.accordproject.org/v2.0/time.cto
import org.accordproject.time.TemporalUnit from https://models.accordproject.org/v2.0/time.cto
import org.accordproject.time.Duration from https://models.accordproject.org/v2.0/time.cto
import org.accordproject.time.PeriodUnit from https://models.accordproject.org/v2.0/time.cto
import org.accordproject.time.Period from https://models.accordproject.org/v2.0/time.cto

Dependencies

  • None

Source

            
namespace org.accordproject.time

/**
 * Months of the year
 */
enum Month {
  o January
  o February
  o March
  o April
  o May
  o June
  o July
  o August
  o September
  o October
  o November
  o December
}

/**
 * Days of the week
 */
enum Day {
  o Monday
  o Tuesday
  o Wednesday
  o Thursday
  o Friday
  o Saturday
  o Sunday
}

/**
 * Units for a duration.
 */
enum TemporalUnit {
  o seconds
  o minutes
  o hours
  o days
  o weeks
}

/**
 * A duration. For example, 6 hours.
 */
concept Duration {
  o Long amount
  o TemporalUnit unit
}

/**
 * Units for a time period.
 */
enum PeriodUnit {
  o days
  o weeks
  o months
  o quarters
  o years
}

/**
 * A time period. For example, 2 months.
 */
concept Period {
  o Long amount
  o PeriodUnit unit
}