<jupyter_start><jupyter_text>Library ▸ Physics ▸ Time  Setup<jupyter_code>import datetime

import Library.Physics as Physics
Scale = Physics.Time.Scale
Date = Physics.Time.Date
Time = Physics.Time.Time
DateTime = Physics.Time.DateTime
Instant = Physics.Time.Instant
Duration = Physics.Time.Duration
Interval = Physics.Time.Interval<jupyter_output><empty_output><jupyter_text>---  Time ▸ Date **Constructors**<jupyter_code>date = Date(2018, 1, 1) ;
Date.Undefined() ;
Date.J2000() ;
Date.GPSEpoch() ;
Date.UnixEpoch() ;
Date.ModifiedJulianDateEpoch() ;
Date.Parse("2018-01-01") ;
Date.Parse("2018-01-01", Date.Format.Standard) ;
Date.Parse("2 Jan 2019", Date.Format.STK) ;<jupyter_output><empty_output><jupyter_text>**Operators**<jupyter_code>date == date ;
date != date ;<jupyter_output><empty_output><jupyter_text>**Methods**<jupyter_code>date.isDefined() ;
date.getYear() ;
date.getDay() ;
date.getMonth() ;
date.toString() ;
date.toString(Date.Format.Standard) ;
date.toString(Date.Format.STK) ;
date.setYear(2019) ;
date.setMonth(2) ;
date.setDay(2) ;<jupyter_output><empty_output><jupyter_text>Time ▸ Time **Constructors**<jupyter_code>time = Time(0, 0, 0) ;
Time.Undefined() ;
Time.Midnight() ;
Time.Noon() ;
Time.Parse("00:00:00") ;
Time.Parse("00:00:00", Time.Format.Standard) ;
Time.Parse("00:00:00", Time.Format.ISO8601) ;<jupyter_output><empty_output><jupyter_text>**Operators**<jupyter_code>time == time ;
time != time ;<jupyter_output><empty_output><jupyter_text>**Methods**<jupyter_code>time.isDefined() ;
time.getHour() ;
time.getMinute() ;
time.getSecond() ;
time.getMillisecond() ;
time.getMicrosecond() ;
time.getNanosecond() ;
time.getFloatingSeconds() ;
time.toString() ;
time.toString(Time.Format.Standard) ;
time.toString(Time.Format.ISO8601) ;
time.setHour(1) ;
time.setMinute(1) ;
time.setSecond(1) ;
time.setMillisecond(1) ;
time.setMicrosecond(1) ;
time.setNanosecond(1) ;<jupyter_output><empty_output><jupyter_text>Time ▸ DateTime **Constructors**<jupyter_code>date_time = DateTime(2018, 1, 1, 0, 0, 0, 0, 0, 0) ;
date_time = DateTime(2018, 1, 1, 0, 0, 0) ;
# DateTime.Undefined() ;
DateTime.J2000() ;
DateTime.GPSEpoch() ;
DateTime.UnixEpoch() ;
DateTime.ModifiedJulianDateEpoch() ;
DateTime.JulianDate(2458119.5) ;
DateTime.ModifiedJulianDate(58119.0) ;
DateTime.Parse("2018-01-01 00:00:00") ;
DateTime.Parse("2018-01-01 00:00:00", DateTime.Format.Standard) ;
DateTime.Parse("2018-01-01T00:00:00", DateTime.Format.ISO8601) ;
DateTime.Parse("1 Jan 2018 00:00:00", DateTime.Format.STK) ;
Instant.DateTime(datetime.datetime.now(), Scale.UTC) ;
# datetime.datetime(date_time)
# datetime.datetime.now() + datetime.timedelta(days = 1) ;<jupyter_output><empty_output><jupyter_text>**Operators**<jupyter_code>date_time == date_time ;
date_time != date_time ;<jupyter_output><empty_output><jupyter_text>**Methods**<jupyter_code>date_time.isDefined() ;
date_time.getDate() ;
date_time.getTime() ;
date_time.getJulianDate() ;
date_time.getModifiedJulianDate() ;
date_time.toString() ;
date_time.toString(DateTime.Format.Standard) ;
date_time.toString(DateTime.Format.ISO8601) ;
date_time.toString(DateTime.Format.STK) ;<jupyter_output><empty_output><jupyter_text>Time ▸ Scale<jupyter_code>UTC = Scale.UTC ;
TAI = Scale.TAI ;
GPST = Scale.GPST ;<jupyter_output><empty_output><jupyter_text>Time ▸ Instant **Constructors**<jupyter_code>instant = Instant.J2000() ;
Instant.Undefined() ;
Instant.Now() ;
Instant.J2000() ;
Instant.DateTime(DateTime(2018, 1, 1, 0, 0, 0, 0, 0, 0), Scale.UTC) ;
Instant.JulianDate(2458119.5, Scale.UTC) ;
Instant.ModifiedJulianDate(58119.0, Scale.UTC) ;<jupyter_output><empty_output><jupyter_text>**Operators**<jupyter_code>instant == instant ;
instant != instant ;
instant < instant ;
instant <= instant ;
instant > instant ;
instant >= instant ;
instant + Duration.Seconds(1.0) ;
instant - Duration.Seconds(1.0) ;
instant - instant ;
instant += Duration.Seconds(1.0) ;
instant -= Duration.Seconds(1.0) ;<jupyter_output><empty_output><jupyter_text>**Methods**<jupyter_code>instant.isDefined() ;
instant.isPostEpoch() ;
instant.isNear(instant, Duration.Zero()) ;
instant.getDateTime(Scale.UTC) ;
instant.getJulianDate(Scale.UTC) ;
instant.getModifiedJulianDate(Scale.UTC) ;
instant.toString() ;
instant.toString(Scale.UTC) ;<jupyter_output><empty_output><jupyter_text>Time ▸ Duration **Constructors**<jupyter_code>duration = Duration.Seconds(123.456) ;
Duration.Undefined() ;
Duration.Zero() ;
Duration.Nanoseconds(1.0) ;
Duration.Microseconds(1.0) ;
Duration.Milliseconds(1.0) ;
Duration.Seconds(1.0) ;
Duration.Minutes(1.0) ;
Duration.Hours(1.0) ;
Duration.Days(1.0) ;
Duration.Weeks(1.0) ;
Duration.Between(Instant.Now(), Instant.Now()) ;
Duration.Parse("02:03.456.000.000") ;
Duration.Parse("02:03.456.000.000", Duration.Format.Standard) ;
Duration.Parse("PT2M3.456S", Duration.Format.ISO8601) ;<jupyter_output><empty_output><jupyter_text>**Operators**<jupyter_code>duration == duration ;
duration != duration ;
duration < duration ;
duration <= duration ;
duration > duration ;
duration >= duration ;
duration + duration ;
duration - duration ;
duration * 2.0 ;
duration / 2.0 ;
duration += duration ;
duration -= duration ;
duration *= 2.0 ;
duration /= 2.0 ;<jupyter_output><empty_output><jupyter_text>**Methods**<jupyter_code>duration.isDefined() ;
duration.isZero() ;
duration.isPositive() ;
duration.isStrictlyPositive() ;
duration.isNear(duration, Duration.Zero()) ;
duration.getNanoseconds() ;
duration.getMicroseconds() ;
duration.getMilliseconds() ;
duration.getSeconds() ;
duration.getMinutes() ;
duration.getHours() ;
duration.getDays() ;
duration.getWeeks() ;
duration.inNanoseconds() ;
duration.inMicroseconds() ;
duration.inMilliseconds() ;
duration.inSeconds() ;
duration.inMinutes() ;
duration.inHours() ;
duration.inDays() ;
duration.inWeeks() ;
duration.inUnit(Physics.Units.Time.Unit.Second) ;
duration.getAbsolute() ;
duration.toString() ;
duration.toString(Duration.Format.Standard) ;
duration.toString(Duration.Format.ISO8601) ;<jupyter_output><empty_output><jupyter_text>Time ▸ Interval **Constructors**<jupyter_code>interval = Interval(Instant.J2000(), Instant.J2000() + Duration.Minutes(1.0), Interval.Type.Closed) ;
interval = Interval.Undefined() ;
interval = Interval.Closed(Instant.J2000(), Instant.J2000() + Duration.Minutes(1.0)) ;<jupyter_output><empty_output><jupyter_text>**Operators**<jupyter_code>interval == interval ;
interval != interval ;<jupyter_output><empty_output><jupyter_text>**Methods**<jupyter_code>interval.isDefined() ;
interval.isDegenerate() ;
interval.intersects(interval) ;
interval.containsInstant(Instant.J2000()) ;
interval.containsInterval(interval) ;
interval.getStart() ;
interval.getEnd() ;
interval.getDuration() ;
interval.getCenter() ;
interval.toString() ;
interval.toString(Scale.UTC) ;
interval.generateGrid(Duration.Seconds(1.0)) ;<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16969608841064418, 'fraction_numerical': 0.045077795550385345, 'mean_word_length': 7.470443349753695, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '20', 'dir': 'jupyter-structured-clean-dedup', 'id': '588152', 'license': 'Apache-2.0', 'n_tokens_mistral': 2776, 'n_tokens_neox': 2510, 'n_words': 321, 'path': 'bindings/python/docs/Reference/Time.ipynb', 'repo_name': 'cowlicks/library-physics', 'size': '6877'}