This is an almost embarrassingly simple stardate calculator. Below is the code, feel free to use and modify it for your own needs!


One thing to note, this is not *technically* an accurate stardate. To calculate a stardate, we must subtract from January 1, 2318. This in result gives us a negative number. However, I think this looks hideous, and as we are still ~300 years way from the date, I don't want to see a negative number next to the stardate. To fix this the absolute number (math.abs) is used.