Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Guild of Archivists
Search
Editing
D'ni time conversion
(section)
From Guild of Archivists
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
Edit source
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Cavernian Calendar Algorithms === The next two algorithms needed are the Cavernian-calendar equivalents of the two algorithms above. We must be able to convert Cavernian date/time values to and from what I shall call the Atrian ''yahr'' number (named in honor of Atrus, son of Gehn), which is the number of ''yahrtee'' and fractions that have elapsed since a given base date. We will use Leefo 1, 9647 DE as our base for these algorithms, rather than Leefo 1, 0 DE, since this will simplify later conversions to and from the Gregorian calendar. (''Yahrtee'' are assumed to begin at the "midnight" β 00:00:00:00 ''gahrtahvotee''β that falls between the previous and current ''yahr''.) ==== Algorithm 3. Cavernian Date to Atrian Yahr Number ==== Assume a Cavernian date given as Yahr, Vailee, and Hahr, with optional time given as Gahrtahvo, Tahvo, Gorahn, and Prorahn. All values are assumed to be integers. A. Calculate the number of whole ''yahrtee'' (WY: an integer) that have elapsed. This is the number of ''yahrtee'' accounted for by the number of ''hahr'' that have passed, plus the number of ''yahrtee'' accounted for by prior ''vaileetee'' in the current ''hahr'', plus the ''yahr'' of the current ''vailee''. <pre> WY = Yahr + ((Vailee - 1) * 29) + ((Hahr - 9647) * 290)</pre> B. Calculate fractional ''yahr'' (FY: a real number), if necessary. This is the time of ''yahr'' in ''prorahntee'', expressed as a fraction of the total number of ''prorahntee'' in a ''yahr''. If no time is included in the conversion, let FY = 0. <pre> FY = ((Gahrtahvo * 15625) + (Tahvo * 625) + (Gorahn * 25) + Prorahn) / 78125</pre> C. Calculate Atrian ''Yahr'' (AY: a real number) as: <pre> AY = WY + FY</pre> ==== Algorithm 4. Atrian ''Yahr'' Number to Cavernian Date ==== Using real arithmetic, calculate Cavernian ''Hahr'', ''Vailee'', ''Yahr'', ''Gahrtahvo'', ''Tahvo'', ''Gorahn'', and ''Prorahn'' from an Atrian ''Yahr'' (AY) that was calculated according to Algorithm 3. The input AY is assumed to be a real number. Output values are assumed to be integers. A. Extract the number of whole ''yahrtee'' and calculate the date: <pre> Z = INT(AY) G = Z - 0.25 A = INT(G / 290) Hahr = 9647 + A C = Z - (A * 290) Vailee = INT((C - 0.25) / 29) + 1 Yahr = C - ((Vailee - 1) * 29)</pre> B. If AY includes a fractional (time of yahr) part, extract the fraction and calculate the time: <pre> Z = (AY - INT(AY)) * 78125 Gahrtahvo = FIX(Z / 15625) R = Z - (Gahrtahvo * 15625) Tahvo = FIX(R / 625) R = R - (Tahvo * 625) Gorahn = FIX(R / 25) Prorahn = R - (Gorahn * 25)</pre>
Summary:
Please note that all contributions to Guild of Archivists may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GoArch:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main Page
Random page
Categories
All pages
Recent changes
Resources
D'ni dictionary
Reference material
Utilities
Community
Forums
Jalak Game Directory
Projects
Apocrypha
Unexplored Branches
All projects
Contribute
Stubs
Wanted
Cleanup
Dead ends
Image requested
Help
Help
Guide
Policies
Wiki tools
Wiki tools
Special pages
Page values
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs