---
title: time-range
slug: enterprise-v6p1/time-range
createdAt: 2025-12-17T08:17:43.843Z
---

AsterNOS YANG Model for Aster NOS Time Range.

Define a period of time, which is in absolute or cyclic type.

# <font color="#1d50a2">YANG Tree Diagram</font>

```none
module: asternos-time-range
  +--rw time-ranges
     +--rw time-range* [name]
        +--rw name                     string
        +--rw (absolute-cyclic)?
           +--:(absolute-range)
           |  +--rw start-date-time?   yang:date-and-time
           |  +--rw end-date-time?     yang:date-and-time
           +--:(cyclic-range)
              +--rw days-in-week?      bits
              +--rw start?             time-hhmm
              +--rw end?               time-hhmm
```

# <font color="#1d50a2">Resources</font>

## <font color="#1d50a2">Resource List</font>

| **Path**                                                               | **Access** |
| ---------------------------------------------------------------------- | ---------- |
| /time-ranges                                                           | Read-Write |
| /time-ranges/time-range                                                | Read-Write |
| /time-ranges/time-range/name                                           | Read-Write |
| /time-ranges/time-range/absolute-cyclic                                | Read-Write |
| /time-ranges/time-range/absolute-cyclic/absolute-range                 | Read-Write |
| /time-ranges/time-range/absolute-cyclic/absolute-range/start-date-time | Read-Write |
| /time-ranges/time-range/absolute-cyclic/absolute-range/end-date-time   | Read-Write |
| /time-ranges/time-range/absolute-cyclic/cyclic-range                   | Read-Write |
| /time-ranges/time-range/absolute-cyclic/cyclic-range/days-in-week      | Read-Write |
| /time-ranges/time-range/absolute-cyclic/cyclic-range/start             | Read-Write |
| /time-ranges/time-range/absolute-cyclic/cyclic-range/end               | Read-Write |

## <font color="#1d50a2">Detailed Nodes</font>

### <font color="#1d50a2">/time-ranges</font>

**Path**

/time-ranges

**Node Type**

container

**Access**

Read-Write

### <font color="#1d50a2">/time-ranges/time-range</font>

**Path**

/time-ranges/time-range

**Node Type**

list

**Description**

The time-range instances.

**Access**

Read-Write

### <font color="#1d50a2">/time-ranges/time-range/name</font>

**Path**

/time-ranges/time-range/name

**Node Type**

leaf

**Description**

The name of time range instance.

**Access**

Read-Write

**Data Type**

\<YANG type string>

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic</font>

**Path**

/time-ranges/time-range/absolute-cyclic

**Node Type**

choice

**Description**

There are two kinds of tima range: the absolute time range and cyclic time range.

Once days-in-week is used, it treated as the cyclic-range.

**Access**

Read-Write

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic/absolute-range</font>

**Path**

/time-ranges/time-range/absolute-cyclic/absolute-range

**Node Type**

choice-case

**Description**

The absolute time.

The end time must be later than the start time.

**Access**

Read-Write

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic/absolute-range/start-date-time</font>

**Path**

/time-ranges/time-range/absolute-cyclic/absolute-range/start-date-time

**Node Type**

leaf

**Description**

The start date and time.

The format can be two types:

1.2023-10-05T14:48:30.123+08:00, it means 14:48:30.123 on October 5, 2023, East 8th District time.

2.2023-10-05T14:48:00Z, it means 14:48:00 on October 5, 2023, UTC time.

Limitation: second, microsecond and timezone is not supported.

**Access**

Read-Write

**Data Type**

\<YANG type date-and-time>

**Constraints**

The date-and-time type is a profile of the ISO 8601 standard for representation of dates and times using the

Gregorian calendar. The profile is defined by the date-time production in Section 5.6 of RFC 3339.

The date-and-time type is compatible with the dateTime XML schema type with the following notable exceptions:

(a) The date-and-time type does not allow negative years.

(b) The date-and-time time-offset -00:00 indicates an unknown time zone (see RFC 3339) while -00:00 and +00:00 and Z all represent the same time zone in dateTime.

(c) The canonical format (see below) of data-and-time values differs from the canonical format used by the dateTime XML schema type, which requires all times to be in UTC using the time-offset 'Z'.

This type is not equivalent to the DateAndTime textual convention of the SMIv2 since RFC 3339 uses a different separator between full-date and full-time and provides higher resolution of time-secfrac.

The canonical format for date-and-time values with a known time zone uses a numeric time zone offset that is calculated using the device's configured known offset to UTC time. A change of the device's offset to UTC time will cause date-and-time values to change accordingly. Such changes might happen periodically in case a server follows automatically daylight saving time (DST) time zone offset changes. The canonical format for date-and-time values with an unknown time zone (usually referring to the notion of local time) uses the time-offset

-00:00.

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic/absolute-range/end-date-time</font>

**Path**

/time-ranges/time-range/absolute-cyclic/absolute-range/end-date-time

**Node Type**

leaf

**Description**

The end date and time, same as the description in start-date-time

**Access**

Read-Write

**Data Type**

\<YANG type date-and-time>

**Constraints**

The date-and-time type is a profile of the ISO 8601 standard for representation of dates and times using the

Gregorian calendar. The profile is defined by the date-time production in Section 5.6 of RFC 3339.

The date-and-time type is compatible with the dateTime XML schema type with the following notable exceptions:

(a) The date-and-time type does not allow negative years.

(b) The date-and-time time-offset -00:00 indicates an unknown time zone (see RFC 3339) while -00:00 and +00:00 and Z all represent the same time zone in dateTime.

(c) The canonical format (see below) of data-and-time values differs from the canonical format used by the dateTime XML schema type, which requires all times to be in UTC using the time-offset 'Z'.

This type is not equivalent to the DateAndTime textual convention of the SMIv2 since RFC 3339 uses a different separator between full-date and full-time and provides higher resolution of time-secfrac.

The canonical format for date-and-time values with a known time zone uses a numeric time zone offset that is calculated using the device's configured known offset to UTC time. A change of the device's offset to UTC time will cause date-and-time values to change accordingly. Such changes might happen periodically in case a server follows automatically daylight saving time (DST) time zone offset changes. The canonical format for date-and-time values with an unknown time zone (usually referring to the notion of local time) uses the time-offset

-00:00.

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic/cyclic-range</font>

**Path**

/time-ranges/time-range/absolute-cyclic/cyclic-range

**Node Type**

choice-case

**Description**

The cyclic time range for days in every week.

**Access**

Read-Write

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic/cyclic-range/days-in-week</font>

**Path**

/time-ranges/time-range/absolute-cyclic/cyclic-range/days-in-week

**Node Type**

leaf

**Description**

A set of days-in-week flags, multiple inputs should be separated by spaces

**Access**

Read-Write

**Data Type**

\<YANG bits bits>

**Constraints**

Bit type with defined bits: \[sunday,monday,tuesday,wednesday,thursday,friday,saturday]

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic/cyclic-range/start</font>

**Path**

/time-ranges/time-range/absolute-cyclic/cyclic-range/start

**Node Type**

leaf

**Description**

The start time of a day.

**Access**

Read-Write

**Data Type**

\<YANG type time-hhmm>

**Constraints**

Multiple constraints:

- String with length: 3 to 5
- Time string with format 'hh\:mm'. 'hh' is hour, 'mm' is minute. Its range is from 00:00 to 23:59.

### <font color="#1d50a2">/time-ranges/time-range/absolute-cyclic/cyclic-range/end</font>

**Path**

/time-ranges/time-range/absolute-cyclic/cyclic-range/end

**Node Type**

leaf

**Description**

The end time of a day.

**Access**

Read-Write

**Data Type**

\<YANG type time-hhmm>

**Constraints**

Multiple constraints:

- String with length: 3 to 5
- Time string with format 'hh\:mm'. 'hh' is hour, 'mm' is minute. Its range is from 00:00 to 23:59.
