ReadonlyB6Convenience property. Same as calling B.time.DateTimeFormatter.ofPattern("uuuu/MM/dd")
ReadonlyB6Convenience property. Same as calling B.time.DateTimeFormatter.ofPattern("uuuu/MM/dd hh:mm:ss a")
ReadonlyB6Convenience property. Same as calling B.time.DateTimeFormatter.ofPattern("hh:mm:ss a")
ReadonlyCalendarThis is deprecated and should only be used when required.
ReadonlyChronoJava doc: java.time.temporial.ChronoUnit
ReadonlyClockJava doc: java.time.Clock
ReadonlyDateJava doc: java.time.DateTimeFormatter
ReadonlyDateJava doc: java.time.DateTimeFormatterBuilder
ReadonlyDayJava doc: java.time.DayOfWeek
ReadonlyDurationJava doc: java.time.Duration
ReadonlyInstantJava doc: java.time.Instant
ReadonlyLocalJava doc: java.time.LocalDate
ReadonlyLocalJava doc: java.time.LocalDateTime
ReadonlyLocalJava doc: java.time.LocalTime
ReadonlyMonthJava doc: java.time.Month
ReadonlyMonthJava doc: java.time.MonthDay
ReadonlyOffsetJava doc: java.time.OffsetDateTime
ReadonlyOffsetJava doc: java.time.OffsetTime
ReadonlyPeriodJava doc: java.time.Period
ReadonlyTemporalJava doc: java.time.temporal.TemporalAdjusters
ReadonlyTimeThis is deprecated and should only be used when required.
ReadonlyValueJava doc: java.time.temporal.ValueRange
ReadonlyYearJava doc: java.time.Year
ReadonlyYearJava doc: java.time.YearMonth
ReadonlyZonedJava doc: java.time.ZonedDateTime
ReadonlyZoneJava doc: java.time.ZoneId
ReadonlyZoneJava doc: java.time.ZoneOffset
Returns a new ZonedDateTime with the DateDiff added.
Adds a value to a calendar field and returns the new field value.
The Calendar field constant (e.g. Calendar.YEAR)
Adds a value to a field of a ZonedDateTime and returns the modified ZonedDateTime.
The Calendar field constant
Alters the input according to the string passed
Formats a legacy Calendar as a string using a SimpleDateFormat pattern.
SimpleDateFormat pattern (e.g. "MM/dd/yyyy")
Formats a temporal as a string using a DateTimeFormatter pattern.
Formats an elapsed time in milliseconds as a human-readable string.
true for short labels (e.g. "2h 3m"), false for full labels (e.g. "2 hours 3 minutes")
Creates a [[Java.Time.Date]] object given an [[Java.Time.Instant]]
Returns the day of the month from a date or datetime.
Returns the day of the week from a legacy Calendar object (1=Sunday, 7=Saturday).
Returns the day of the week (1=Sunday, 7=Saturday) from a date or datetime.
Returns the ordinal day-of-week within the month from a legacy Calendar object.
Returns the ordinal day-of-week within the month from a date or datetime.
Returns the day of the year from a date or datetime.
Returns the 12-hour clock hour from a time or datetime.
Returns the 24-hour clock hour from a time or datetime.
Returns true if the legacy Calendar object is in the AM period.
Returns true if the time or datetime is in the AM period.
Returns the month (0-based, 0=January) from a date or datetime.
Returns the time in milliseconds since epoch from a legacy Calendar object.
Returns the time zone ID string from a legacy Calendar object.
Returns the week of the month from a date or datetime.
Returns the week of the year from a date or datetime.
Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.
Returns the current value of the running Java Virtual Machine's high-resolution time source, in nanoseconds. This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time. The value returned represents nanoseconds since some fixed but arbitrary origin time (perhaps in the future, so values may be negative). The same origin is used by all invocations of this method in an instance of a Java virtual machine; other virtual machine instances are likely to use a different origin. This method provides nanosecond precision, but not necessarily nanosecond resolution (that is, how frequently the value changes) - no guarantees are made except that the resolution is at least as good as that of currentTimeMillis(). Differences in successive calls that span greater than approximately 292 years (263 nanoseconds) will not correctly compute elapsed time due to numerical overflow. The values returned by this method become meaningful only when the difference between two such values, obtained within the same instance of a Java virtual machine, is computed. For example, to measure how long some code takes to execute: long startTime = B.time.nanos(); // ... the code being measured ... long elapsedNanos = B.time.nanos() - startTime; To compare elapsed time against a timeout, use if (B.time.nanos() - startTime >= timeoutNanos) ... instead of if (B.time.nanos() >= startTime + timeoutNanos) ... because of the possibility of numerical overflow.
Alters the input according to the string passed
Sets the day of the month on a legacy Calendar object.
Returns a new ZonedDateTime with the day of month set.
Sets the day of the week on a legacy Calendar object (1=Sunday, 7=Saturday).
Returns a new ZonedDateTime with the day of week set (1=Sunday, 7=Saturday).
Sets the ordinal day-of-week within the month on a legacy Calendar object.
Sets the day of the year on a legacy Calendar object.
Returns a new ZonedDateTime with the day of year set.
Sets the 12-hour clock hour on a legacy Calendar object.
Returns a new ZonedDateTime with the 12-hour clock hour set.
Sets the 24-hour clock hour on a legacy Calendar object.
Returns a new ZonedDateTime with the 24-hour clock hour set.
Sets the AM/PM flag on a legacy Calendar object.
true for AM, false for PM
Returns a new ZonedDateTime with AM/PM set.
true for AM, false for PM
Returns a new ZonedDateTime with the millisecond set.
Returns a new ZonedDateTime with the minute set.
Sets the month (0-based) on a legacy Calendar object.
Returns a new ZonedDateTime with the month set (0-based, 0=January).
Returns a new ZonedDateTime with the second set.
Sets the time in milliseconds since epoch on a legacy Calendar object.
Returns a new ZonedDateTime with the epoch millis set.
Sets the time zone on a legacy Calendar object.
Time zone ID (e.g. "America/New_York")
Returns a new ZonedDateTime with the time zone set.
Sets the week of the month on a legacy Calendar object.
Sets the week of the year on a legacy Calendar object.
Returns a new ZonedDateTime with the year set.
Returns a new ZonedDateTime with the DateDiff subtracted.
Parses a date string into a legacy Calendar using a SimpleDateFormat pattern. Default format: MM/dd/yyyy.
OptionalformatStr: stringSimpleDateFormat pattern
Parses a date/time string into a legacy Calendar using a SimpleDateFormat pattern. Default format: MM/dd/yyyy h:mma.
OptionalformatStr: stringSimpleDateFormat pattern
OptionaltimeZoneId: stringTime zone ID (e.g. "America/New_York")
Parses a date string into a LocalDate using a DateTimeFormatter pattern. Default format: MM/dd/yyyy.
OptionalformatStr: stringParses a time string into a LocalTime using a DateTimeFormatter pattern. Default format: h:mma.
OptionalformatStr: stringParses a time string into a legacy Calendar using a SimpleDateFormat pattern. Default format: h:mma.
OptionalformatStr: stringSimpleDateFormat pattern
Parses a date/time string into a ZonedDateTime using a DateTimeFormatter pattern. Default format: MM/dd/yyyy h:mma.
OptionalformatStr: stringOptionaltimeZoneId: stringReturn the user's ZoneId or the Systems ZoneId if there is no user.
This is an implementation of Java Time. See the docs for java.time (SE 11). If you don't like
java.time, feel free to import a JavaScript library to use.Ways to get the current time: