Bluestep JS Documentation
    Preparing search index...

    Class UserTime

    Represents times using the user's time zone.

    Index

    Constructors

    Methods

    • A [[Java.Time.Clock]] providing access to the current instant, date, and time using the user's time-zone.

      Returns Clock

      const userClock = userTime.clock();
      
    • A [[Java.Time.LocalDate]] date-time object that represents a date using the user's time-zone.

      Returns LocalDate

      const localDate = userTime.localDate();
      
    • A [[Java.Time.LocalDateTime]] date-time object that represents a date-time using the user's time-zone. Represented to nanosecond precision.

      Returns LocalDateTime

      const localDateTime = userTime.localDateTime();
      
    • A [[Java.Time.LocalTime]] date-time object that represents a time, often viewed as hour-minute-second. Time is represented to nanosecond precision.

      Returns LocalTime

      const localTime = userTime.localTime();
      
    • A current date-time from the system clock in the default time-zone.

      Returns ZonedDateTime

      const nowZoneDateTime = userTime.now();
      const nowHour = nowZoneDateTime.getHour();
    • A [[Java.Time.OffsetDateTime]] which is a [[Java.Time.Instant]] plus an offset from UTC/Greenwich, which allows the local date-time to be obtained. ZonedDateTime adds full time-zone rules.

      Returns OffsetDateTime

      const offsetDateTime = userTime.offsetDateTime();
      
    • A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 10:15:30+01:00.

      Returns OffsetTime

      const offsetTime = userTime.offsetTime();
      
    • The current year in the ISO-8601 calendar system, such as 2019.

      Returns Year

      const curYear = userTime.year();
      
    • The current year and month in the ISO-8601 calendar system, such as 2007-12.

      Returns YearMonth

      const yearMonth = userTime.yearMonth();
      
    • Returns the [[Java.Time.ZoneId]] that represents the users time zone.

      Returns ZoneId

      const timeZoneId = userTime.zoneId();