时间类型

类型 描述 示例

DateTime

ISO 日期时间字符串,存储为 datetime 时间类型。

type User {
    createdAt: DateTime
}

Date

“YYYY-MM-DD” 日期字符串,存储为 date 时间类型。

type Movie {
    releaseDate: Date
}

Duration

ISO 8601 持续时间字符串,存储为 duration 类型。

[YMWD] 上目前不接受十进制值。比较根据 Cypher 开发者指南 进行。

type Movie {
    runningTime: Duration!
}

LocalDateTime

“YYYY-MM-DDTHH:MM:SS” 日期时间字符串,存储为 LocalDateTime 时间类型。

type Movie {
    nextShowing: LocalDateTime
}

Time

RFC3339 时间字符串,存储为 Time 时间类型。

type Movie {
    nextShowing: Time
}

LocalTime

“HH:MM:SS[.sss+]” 时间字符串,存储为 LocalTime 时间类型。

type Movie {
    nextShowing: LocalTime
}