3c: Urbit Time
+year
+yearDate to @da.
Accept a parsed date of form [[a=? y=@ud] m=@ud t=tarp] and produce its @da representation.
Accepts
.det is a $date.
Produces
A @da.
Source
++ year
|= det=date
^- @da
=+ ^= yer
?: a.det
(add 292.277.024.400 y.det)
(sub 292.277.024.400 (dec y.det))
=+ day=(yawn yer m.det d.t.det)
(yule day h.t.det m.t.det s.t.det f.t.det)Examples
+yore
+yoreDate from atomic date.
Produces a $date from a @da.
Accepts
.now is a time $atom, @da.
Produces
A $date.
Source
Examples
+yell
+yellTarp from atomic date.
Produce a $tarp time format from a@da.
Accepts
.now is a @da.
Produces
A $tarp.
Source
Examples
+yule
+yuleDaily time to time $atom.
Accepts a $tarp, a parsed daily time, and produces a @da.
Accepts
+rip is a $tarp.
Produces
A time $atom, @da.
Source
Examples
+yall
+yallTime since beginning of time.
Produce the date tuple of [y=@ud m=@ud d=@ud] of the year, month, and day from a number of days from the beginning of the Gregorian calendar.
Accepts
+day is a @ud.
Produces
A cell of unsigned decimals.
Source
Examples
+yawn
+yawnDays since beginning of time.
Inverse of +yall, computes number of days A.D. from y/m/d date as the tuple [yer=@ud mot=@ud day=@ud].
Accepts
.yer is an unsigned decimal.
.mon is an unsigned decimal.
.day is an unsigned decimal.
Produces
An unsigned decimal.
Source
Examples
+yelp
+yelpLeap year?
Determines whether a year is a leap year. Produces a $flag.
Accepts
.yer is an unsigned decimal.
Produces
A $flag.
Source
Examples
+yo
+yoTime constants core.
Core whose arms contain constants for interacting with Earth time.
Source
+cet:yo
+cet:yoDays in a century.
Derived by multiplying the number of days in a year (365) by the number of years in a century (100), then adding the number days from leap-years in a century (24).
Produces
An $atom.
Source
Examples
+day:yo
+day:yoSeconds in day.
The number of seconds in a day.
Produces
An $atom.
Source
Examples
+era:yo
+era:yoLeap-year period.
The number of days in a 400-year period, arrived at by multiplying +cet by four and adding one. This is done because every 400 years, there is a leap-year where there would otherwise not be.
Produces
An $atom.
Source
Examples
Discussion
A year is a leap-year if it's divisible by 4, unless it's divisible by 100, or if it's divisible by 400.
+hor:yo
+hor:yoSeconds in hour.
The number of seconds in an hour. Derived by multiplying the number of seconds in a minute by the minutes in an hour.
Produces
An $atom.
Source
Examples
+jes:yo
+jes:yoMaximum 64-bit timestamp.
This is the number of days (starting from 1970) that can be represented in a 64-bit timestamp. Derived by multiplying +era:yo by 730,692,561.
Produces
An $atom.
Source
Examples
Discussion
The date is December 4, 292,277,026,596.
+mit:yo
+mit:yoSeconds in minute.
The number of seconds in a minute.
Produces
An $atom.
Source
Examples
+moh:yo
+moh:yoDays in month.
The days in each month of the Gregorian common year. A list of unsigned decimal $atoms (Either 28, 30, or 31) denoting the number of days in the month at the year at that index.
Produces
A +list of @ud
Source
Examples
+moy:yo
+moy:yoDays in months of leap-year.
The days in each month of the Gregorian leap-year. A list of unsigned decimal $atoms (Either 29, 30, or 31) denoting the number of days in the month at the leap-year at that index.
Produces
A +list of @ud.
Source
Examples
+qad:yo
+qad:yoSeconds in 4 years.
The number of seconds in four years. Derived by adding one second to the number of seconds in four years.
Produces
An $atom.
Source
Examples
+yer:yo
+yer:yoSeconds in year.
The number of seconds in a year. Derived by multiplying the number of seconds in a day by 365.
Produces
An $atom.
Source
Examples
Last updated