src/nodejs/jstemporal

    Dark Mode
Search:
Group by:

  • Temporal date and time API for JavaScript targets.

Types

TemporalCalendar {.importjs: "Temporal.Calendar".} = object
  id*: cstring
TemporalDuration {.importjs: "Temporal.Duration".} = object
  years*, months*, days*, hours*, minutes*, seconds*, milliseconds*,
  microseconds*, sign*, nanoseconds*: cint
  blank*: bool
TemporalInstant {.importjs: "Temporal.Instant".} = object
  epochSeconds*, epochMilliseconds*: cint
  epochMicroseconds*, epochNanoseconds*: JsBigInt
TemporalNow {.importjs: "Temporal.Now".} = object
TemporalPlainDate {.importjs: "Temporal.PlainDate".} = object
  year*, month*, day*: cint
  eraYear*, dayOfWeek*, dayOfYear*: cint
  weekOfYear*, daysInWeek*, daysInMonth*, daysInYear*, monthsInYear*,
  hoursInDay*: cint
  monthCode*, era*: cstring
  calendar*: JsObject
  inLeapYear*: bool
TemporalPlainDateTime {.importjs: "Temporal.PlainDateTime".} = object
  year*, month*, day*, hour*, minute*, second*, millisecond*, microsecond*: cint
  nanosecond*, epochSeconds*, epochMilliseconds*, eraYear*, dayOfWeek*,
  dayOfYear*: cint
  weekOfYear*, daysInWeek*, daysInMonth*, daysInYear*, monthsInYear*,
  hoursInDay*, offsetNanoseconds*: cint
  epochMicroseconds*, epochNanoseconds*: JsBigInt
  monthCode*, era*, offset*: cstring
  calendar*: JsObject
  inLeapYear*: bool
TemporalPlainTime {.importjs: "Temporal.PlainTime".} = object
  hour*, minute*, second*, millisecond*, microsecond*, nanosecond*,
  epochSeconds*, epochMilliseconds*, offsetNanoseconds*: cint
  epochMicroseconds*, epochNanoseconds*: JsBigInt
  offset*: cstring
  calendar*: TemporalCalendar
TemporalTimeZone {.importjs: "Temporal.TimeZone".} = object
  id*: cstring
TemporalTimeZoneProtocol {.importjs: "Temporal.TimeZoneProtocol".} = object
TemporalZonedDateTime {.importjs: "Temporal.ZonedDateTime".} = object
  year*, month*, day*, hour*, minute*, second*, millisecond*, microsecond*: cint
  nanosecond*, epochSeconds*, epochMilliseconds*, eraYear*, dayOfWeek*,
  dayOfYear*: cint
  weekOfYear*, daysInWeek*, daysInMonth*, daysInYear*, monthsInYear*,
  hoursInDay*, offsetNanoseconds*: cint
  epochMicroseconds*, epochNanoseconds*: JsBigInt
  monthCode*, era*, offset*: cstring
  calendar*: JsObject
  timeZone*: TemporalTimeZoneProtocol
  inLeapYear*: bool

Procs

func `<`(a, b: TemporalInstant): bool {.importjs: "(Temporal.Instant.compare(#, #) === -1)",
                                        ...raises: [], tags: [].}
func `<`(a, b: TemporalZonedDateTime): bool {.
    importjs: "(Temporal.ZonedDateTime.compare(#, #) === -1)", ...raises: [],
    tags: [].}
func `==`(a, b: TemporalInstant): bool {.importjs: "#.equals(#)", ...raises: [],
    tags: [].}
func `==`(a, b: TemporalPlainDate): bool {.importjs: "#.equals(#)", ...raises: [],
    tags: [].}
func `==`(a, b: TemporalPlainDateTime): bool {.importjs: "#.equals(#)",
    ...raises: [], tags: [].}
func `==`(a, b: TemporalPlainTime): bool {.importjs: "#.equals(#)", ...raises: [],
    tags: [].}
func `==`(a, b: TemporalZonedDateTime): bool {.importjs: "#.equals(#)",
    ...raises: [], tags: [].}
func abs(self: TemporalDuration): TemporalDuration {.importjs: "#.$1()",
    ...raises: [], tags: [].}
func add(self: TemporalInstant;
         duration: cstring or JsObject or TemporalDuration): TemporalInstant {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func add(self: TemporalPlainDate;
         duration, options: cstring or JsObject or TemporalDuration): TemporalPlainDate {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func add(self: TemporalPlainDate;
         duration: cstring or JsObject or TemporalDuration): TemporalPlainDate {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func add(self: TemporalPlainDateTime;
         duration, options: cstring or JsObject or TemporalDuration): TemporalPlainDateTime {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func add(self: TemporalPlainDateTime;
         duration: cstring or JsObject or TemporalDuration): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func add(self: TemporalPlainTime;
         duration: cstring or JsObject or TemporalDuration): TemporalPlainTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func add(self: TemporalZonedDateTime; duration, options: JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func add(self: TemporalZonedDateTime; duration: JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func compare(a, b: TemporalDuration): cint {.
    importjs: "Temporal.Duration.compare(#, #)", ...raises: [], tags: [].}
func compare(a, b: TemporalInstant): cint {.
    importjs: "Temporal.Instant.compare(#, #)", ...raises: [], tags: [].}
func compare(a, b: TemporalPlainDate): cint {.
    importjs: "Temporal.PlainDate.compare(#, #)", ...raises: [], tags: [].}
func compare(a, b: TemporalPlainDateTime): cint {.
    importjs: "Temporal.TemporalPlainDateTime.compare(#, #)", ...raises: [],
    tags: [].}
func compare(a, b: TemporalPlainTime): cint {.
    importjs: "Temporal.TemporalPlainTime.compare(#, #)", ...raises: [], tags: [].}
func compare(a, b: TemporalZonedDateTime): cint {.
    importjs: "Temporal.ZonedDateTime.compare(#, #)", ...raises: [], tags: [].}
func day(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func dayOfWeek(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func dayOfYear(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func daysInMonth(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func daysInWeek(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func daysInYear(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func era(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cstring {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func eraYear(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func fromEpochMicroseconds(epochMicroseconds: JsBigInt): TemporalInstant {.
    importjs: "Temporal.Instant.fromEpochMicroseconds(#)", ...raises: [], tags: [].}
func fromEpochMilliseconds(epochMilliseconds: cint or float): TemporalInstant {.
    importjs: "Temporal.Instant.fromEpochMilliseconds(#)", ...raises: [], tags: [].}
func fromEpochNanoseconds(epochNanoseconds: JsBigInt): TemporalInstant {.
    importjs: "Temporal.Instant.fromEpochNanoseconds(#)", ...raises: [], tags: [].}
func fromEpochSeconds(epochSeconds: cint or float): TemporalInstant {.
    importjs: "Temporal.Instant.fromEpochSeconds(#)", ...raises: [], tags: [].}
func getInstantFor(self: TemporalTimeZone;
                   dateTime: TemporalPlainDateTime or cstring or JsObject): TemporalInstant {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func getInstantFor(self: TemporalTimeZone;
                   dateTime: TemporalPlainDateTime or cstring or JsObject;
                   options: JsObject): TemporalInstant {.importjs: "#.$1(#, #)",
    ...raises: [], tags: [].}
func getISOFields(self: TemporalZonedDateTime or TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime): JsObject {.importjs: "#.$1()", ...raises: [], tags: [].}
func getNextTransition(self: TemporalTimeZone;
                       startingPoint: TemporalInstant or cstring): TemporalInstant {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func getOffsetNanosecondsFor(self: TemporalTimeZone;
                             instant: TemporalInstant or cstring): cint {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func getOffsetStringFor(self: TemporalTimeZone;
                        instant: TemporalInstant or cstring): cstring {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func getPlainDateTimeFor(self: TemporalTimeZone;
                         instant: TemporalInstant or cstring): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func getPlainDateTimeFor(self: TemporalTimeZone;
                         instant: TemporalInstant or cstring;
                         calendar: JsObject or cstring): TemporalPlainDateTime {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func getPossibleInstantsFor(self: TemporalTimeZone; dateTime: TemporalPlainDateTime or
    cstring or
    JsObject): seq[TemporalInstant] {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func getPreviousTransition(self: TemporalTimeZone;
                           startingPoint: TemporalInstant or cstring): TemporalInstant {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func inLeapYear(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): bool {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func instant(self: TemporalNow): TemporalInstant {.importjs: "#.$1()",
    ...raises: [], tags: [].}
func month(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func monthCode(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cstring {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func monthsInYear(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func negated(self: TemporalDuration): TemporalDuration {.importjs: "#.$1()",
    ...raises: [], tags: [].}
func newTemporalCalendar(calendarIdentifier: cstring): TemporalCalendar {.
    importjs: "(new Temporal.Calendar(#))", ...raises: [], tags: [].}
func newTemporalCalendar(thing: auto): TemporalCalendar {.
    importjs: "Temporal.Calendar.from(#)", ...raises: [], tags: [].}
func newTemporalDuration(thing: auto): TemporalDuration {.
    importjs: "Temporal.Duration.from(#)", ...raises: [], tags: [].}
func newTemporalDuration(years, months, weeks, days, hours, minutes, seconds,
                         milliseconds, microseconds, nanoseconds: cint = 0): TemporalDuration {.
    importjs: "(new Temporal.Duration((#, #, #, #, #, #, #, #, #, #))",
    ...raises: [], tags: [].}
func newTemporalInstant(epochNanoseconds: JsBigInt): TemporalInstant {.
    importjs: "(new Temporal.Instant(#))", ...raises: [], tags: [].}
func newTemporalInstant(thing: auto): TemporalInstant {.
    importjs: "Temporal.Instant.from(#)", ...raises: [], tags: [].}
func newTemporalPlainDate(isoYear, isoMonth, isoDay: cint): TemporalPlainDate {.
    importjs: "(new Temporal.PlainDate(#, #, #))", ...raises: [], tags: [].}
func newTemporalPlainDate(isoYear, isoMonth, isoDay: cint;
                          calendar: cstring or JsObject): TemporalPlainDate {.
    importjs: "(new Temporal.PlainDate(#, #, #, #))", ...raises: [], tags: [].}
func newTemporalPlainDate(thing: auto): TemporalPlainDate {.
    importjs: "Temporal.PlainDate.from(#)", ...raises: [], tags: [].}
func newTemporalPlainDate(thing: auto; options: JsObject): TemporalPlainDate {.
    importjs: "Temporal.PlainDate.from(#, #)", ...raises: [], tags: [].}
func newTemporalPlainDateTime(isoYear, isoMonth, isoDay, isoHour, isoMinute,
                              isoSecond, isoMillisecond, isoMicrosecond,
                              isoNanosecond: cint = 0): TemporalPlainDateTime {.
    importjs: "#.$1(#, #, #, #, #, #, #, #, #)", ...raises: [], tags: [].}
func newTemporalPlainDateTime(isoYear, isoMonth, isoDay, isoHour, isoMinute,
                              isoSecond, isoMillisecond, isoMicrosecond,
                              isoNanosecond: cint = 0;
                              calendar: cstring or JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#, #, #, #, #, #, #, #, #, #)", ...raises: [], tags: [].}
func newTemporalPlainDateTime(thing: auto): TemporalPlainDateTime {.
    importjs: "Temporal.PlainDateTime.from(#)", ...raises: [], tags: [].}
func newTemporalPlainDateTime(thing: auto; options: JsObject): TemporalPlainDateTime {.
    importjs: "Temporal.PlainDateTime.from(#, #)", ...raises: [], tags: [].}
func newTemporalPlainTime(isoHour, isoMinute, isoSecond, isoMillisecond,
                          isoMicrosecond, isoNanosecond: cint = 0): TemporalPlainTime {.
    importjs: "(new Temporal.PlainTime(#, #, #, #, #, #))", ...raises: [], tags: [].}
func newTemporalPlainTime(thing: auto): TemporalPlainTime {.
    importjs: "Temporal.PlainTime.from(#)", ...raises: [], tags: [].}
func newTemporalPlainTime(thing: auto; options: JsObject): TemporalPlainTime {.
    importjs: "Temporal.PlainTime.from(#, #)", ...raises: [], tags: [].}
func newTemporalTimeZone(thing: auto): TemporalTimeZone {.
    importjs: "Temporal.TimeZone.from(#)", ...raises: [], tags: [].}
func newTemporalTimeZone(timeZoneIdentifier: cstring): TemporalTimeZone {.
    importjs: "(new Temporal.TimeZone(#))", ...raises: [], tags: [].}
func newTemporalZonedDateTime(epochNanoseconds: JsBigInt;
                              timeZone, calendar: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "(new Temporal.ZonedDateTime(#, #, #))", ...raises: [], tags: [].}
func newTemporalZonedDateTime(epochNanoseconds: JsBigInt;
                              timeZone: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "(new Temporal.ZonedDateTime(#, #))", ...raises: [], tags: [].}
func newTemporalZonedDateTime(thing: auto): TemporalZonedDateTime {.
    importjs: "(Temporal.ZonedDateTime.from((#))", ...raises: [], tags: [].}
func newTemporalZonedDateTime(thing: auto; options: JsObject): TemporalZonedDateTime {.
    importjs: "(Temporal.ZonedDateTime.from((#, #))", ...raises: [], tags: [].}
func plainDate(self: TemporalNow; calendar, timeZone: cstring or JsObject): TemporalPlainDate {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func plainDateISO(self: TemporalNow; timeZone: cstring or JsObject): TemporalPlainDate {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func plainDateTime(self: TemporalNow; calendar, timeZone: cstring or JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func plainDateTimeISO(self: TemporalNow; timeZone: cstring or JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func plainTimeISO(self: TemporalNow; timeZone: cstring or JsObject): TemporalPlainDate {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func round(self: TemporalDuration; options: JsObject): TemporalDuration {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func round(self: TemporalInstant; options: JsObject): TemporalInstant {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func round(self: TemporalPlainDateTime; options: JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func round(self: TemporalPlainTime; options: JsObject): TemporalPlainTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func round(self: TemporalZonedDateTime; options: JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func since(self, other: TemporalInstant or TemporalZonedDateTime or
    TemporalPlainDate or
    TemporalPlainTime): TemporalDuration {.importjs: "#.$1(#)", ...raises: [],
    tags: [].}
func subtract(self: TemporalDuration;
              duration, options: cstring or JsObject or TemporalDuration): TemporalDuration {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func subtract(self: TemporalDuration;
              duration: cstring or JsObject or TemporalDuration): TemporalDuration {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func subtract(self: TemporalInstant;
              duration: cstring or JsObject or TemporalDuration): TemporalInstant {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func subtract(self: TemporalPlainDate;
              duration, options: cstring or JsObject or TemporalDuration): TemporalPlainDate {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func subtract(self: TemporalPlainDate;
              duration: cstring or JsObject or TemporalDuration): TemporalPlainDate {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func subtract(self: TemporalPlainDateTime;
              duration: cstring or JsObject or TemporalDuration): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func subtract(self: TemporalPlainTime;
              duration: cstring or JsObject or TemporalDuration): TemporalPlainTime {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func subtract(self: TemporalZonedDateTime; duration, options: JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func subtract(self: TemporalZonedDateTime; duration: JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func timeZone(self: TemporalNow): TemporalTimeZone {.importjs: "#.$1()",
    ...raises: [], tags: [].}
func toCstring(self: TemporalInstant or TemporalZonedDateTime or
    TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime or
    TemporalDuration or
    TemporalTimeZone): cstring {.importjs: "#.toString()", ...raises: [], tags: [].}
func toCstring(self: TemporalInstant or TemporalZonedDateTime or
    TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime or
    TemporalDuration or
    TemporalTimeZone; options: JsObject): cstring {.importjs: "#.toString(#)",
    ...raises: [], tags: [].}
func toInstant(self: TemporalZonedDateTime): TemporalInstant {.
    importjs: "#.$1()", ...raises: [], tags: [].}
func toJSON(self: TemporalInstant or TemporalZonedDateTime or TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime or
    TemporalDuration or
    TemporalTimeZone): cstring {.importjs: "#.$1()", ...raises: [], tags: [].}
func toLocaleString(self: TemporalInstant or TemporalZonedDateTime or
    TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime or
    TemporalDuration): cstring {.importjs: "#.$1()", ...raises: [], tags: [].}
func toLocaleString(self: TemporalInstant or TemporalZonedDateTime or
    TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime or
    TemporalDuration; locales: cstring or seq[string]): cstring {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func toLocaleString(self: TemporalInstant or TemporalZonedDateTime or
    TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime or
    TemporalDuration; locales: cstring or seq[string]; options: JsObject): cstring {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func toPlainDate(self: TemporalZonedDateTime or TemporalPlainDateTime): TemporalPlainDate {.
    importjs: "#.$1()", ...raises: [], tags: [].}
func toPlainDateTime(self: TemporalZonedDateTime or TemporalPlainDate or
    TemporalPlainTime): TemporalPlainDateTime {.importjs: "#.$1()", ...raises: [],
    tags: [].}
func toPlainTime(self: TemporalZonedDateTime or TemporalPlainDateTime): TemporalPlainTime {.
    importjs: "#.$1()", ...raises: [], tags: [].}
func total(self: TemporalDuration; options: JsObject): cint {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func toZonedDateTime(self: TemporalInstant or TemporalPlainDate or
    TemporalPlainTime or
    TemporalPlainDateTime; timeZone: JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func toZonedDateTimeISO(self: TemporalInstant; timeZone: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func weekOfYear(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func with(self: TemporalDuration; durationLike: JsObject): TemporalDuration {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func with(self: TemporalPlainDate; dateLike: cstring or JsObject): TemporalPlainDate {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func with(self: TemporalPlainDate; dateLike: cstring or JsObject;
          options: JsObject): TemporalPlainDate {.importjs: "#.$1(#, #)",
    ...raises: [], tags: [].}
func with(self: TemporalPlainDateTime; dateTimeLike: cstring or JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func with(self: TemporalPlainDateTime; dateTimeLike: cstring or JsObject;
          options: JsObject): TemporalPlainDateTime {.importjs: "#.$1(#, #)",
    ...raises: [], tags: [].}
func with(self: TemporalPlainTime; dateLike: cstring or JsObject): TemporalPlainTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func with(self: TemporalPlainTime; dateLike: cstring or JsObject;
          options: JsObject): TemporalPlainTime {.importjs: "#.$1(#, #)",
    ...raises: [], tags: [].}
func with(self: TemporalZonedDateTime; zonedDateTimeLike: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func with(self: TemporalZonedDateTime; zonedDateTimeLike: cstring or JsObject;
          options: JsObject): TemporalZonedDateTime {.importjs: "#.$1(#, #)",
    ...raises: [], tags: [].}
func withCalendar(self: TemporalPlainDate; calendar: cstring or JsObject): TemporalPlainDate {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func withCalendar(self: TemporalPlainDateTime; calendar: cstring or JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func withCalendar(self: TemporalZonedDateTime; calendar: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func withPlainDate(self: TemporalZonedDateTime or TemporalPlainDateTime;
                   plainDate: cstring or JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func withPlainTime(self: TemporalZonedDateTime or TemporalPlainDateTime): TemporalPlainDateTime {.
    importjs: "#.$1()", ...raises: [], tags: [].}
func withPlainTime(self: TemporalZonedDateTime or TemporalPlainDateTime;
                   plainTime: cstring or JsObject): TemporalPlainDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func withTimeZone(self: TemporalZonedDateTime; timeZone: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}
func year(self: TemporalCalendar; date: TemporalPlainDate or
    TemporalPlainDateTime or
    TemporalZonedDateTime or
    cstring): cint {.importjs: "#.$1(#)", ...raises: [], tags: [].}
func zonedDateTime(self: TemporalNow; calendar: cstring or JsObject;
                   timeZone: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#, #)", ...raises: [], tags: [].}
func zonedDateTimeISO(self: TemporalNow; timeZone: cstring or JsObject): TemporalZonedDateTime {.
    importjs: "#.$1(#)", ...raises: [], tags: [].}