Announcement

Collapse
No announcement yet.

My Bravo Fleet Stardate Converter

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • My Bravo Fleet Stardate Converter

    I'm not very good with Javascript as I don't use it often, but I wanted to try and make an easy stardate/date converter that takes your local date and time and converts it into the BF universe time.

    Here's the source code.

    Or you can see it in action here.

    Let me know what you think.
    Last edited by trekky0623; 06-02-2017, 04:57 AM. Reason: Updated URL one more time.

  • #2
    This is awesome trekky0623!

    I am so sorry you had to deal with this mess hehe:

    Code:
      if (d <= Date.UTC(2014, 0, 1)) {
        return (bfEpoch + (d - rlEpoch) / 2);
      } else if (d <= Date.UTC(2018, 0, 1)) {
        rlEpoch = Date.UTC(2014, 0, 1);
        bfEpoch = bravoDate(rlEpoch);
        return (bfEpoch + (d - rlEpoch) / 4);
      } else {
        rlEpoch = Date.UTC(2018, 0, 1);
        bfEpoch = bravoDate(rlEpoch);
        return (bfEpoch + (d - rlEpoch) / 2);
      }

    Comment


    • #3
      That's all right. 👍 It was fun, and I hope others find it useful.

      Comment

      Working...
      X