Namespace org.accordproject.time@0.3.0

Compatible with Concerto versions ^3.0.0. Has 6 declarations.

Concerto JSON AST UML JSON Schema XML Schema GraphQL TypeScript CSharp Java Go OData

Declared Types

      
      import org.accordproject.time@0.3.0.Month from /time@0.3.0.cto
      import org.accordproject.time@0.3.0.Day from /time@0.3.0.cto
      import org.accordproject.time@0.3.0.TemporalUnit from /time@0.3.0.cto
      import org.accordproject.time@0.3.0.Duration from /time@0.3.0.cto
      import org.accordproject.time@0.3.0.PeriodUnit from /time@0.3.0.cto
      import org.accordproject.time@0.3.0.Period from /time@0.3.0.cto
      
      

Dependencies

  • None

Source

    /*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
concerto version "^3.0.0"

namespace org.accordproject.time@0.3.0

/**
 * 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
}