Welcome to ATS' own wiki.

Read and remember the rules and conventions, they can be found at Help

Stardate Functions

From ATS Wiki

In an effort to have people use stardates and the in-game Julian calendar more frequently than real-life dates in brackets, parentheses or chevrons, the following global functions can be used:

Contents

How to use stardates

sd2secs/secs2sd

This very moment's stardate: secs2sd(secs())
A stardate in the past or future: secs2sd(convtime(Mon Jul 01 01:00:00 2000)) (The day of the week does not have to be correct, but it is required)
A real-life date from a stardate: convsecs(sd2secs(80000.000000)) (The stardate is not required to go to the sixth decimal point, or to any decimal point at all)

rl2stardate/stardate2rl

Use these functions to convert to/from any real life date to one in the future.

It allows you to convert without having to use the intermediate convtime() as above. For example: rl2stardate(Mon Jul 01 01:00:00 2000)

Or use stardate2rl(80000) to convert from a stardate to a real date.

Follows same rules as above.


How to use the in-game Julian calendar

This requires that one has the stardate to begin with, as there are no functions that perform the equation from secs() directly to the Julian date.

This very moment's time and date: stardate2ad(secs2sd(secs()))
A date in the past or future: stardate2ad(secs2sd(convtime(Mon Jul 01 01:00:00 2000)) (As above, the day of the week is not necessary to be correct, but is required)