Topic

How can I convert a past (real) date and time to its corresponding Glitch date?

Without counting backwards a lot, of course :)

Posted 14 months ago by Stars Subscriber! | Permalink

Replies

  • A Glitch day = 4 real time hours, 6 Glitch days = 1 real day.  So I guess just work back from there.
    Posted 14 months ago by Joojoo Subscriber! | Permalink
  • At this point it is, yes, a lot of backward counting.
    I would LOVE an app that lets you plug in a real world day/time and it gives you the Glitch day and visa versa.
    Posted 14 months ago by Lord Bacon-o Subscriber! | Permalink
  • The developers have actually put up some sample code on how to convert between real world and Glitch time. I looked around and thought I might have a go at writing something with that. 

    Two hours later...

    Okay, that took a lot longer than I thought. Still, here's the 'app' that converts real world datetime to Glitch datetime. All it's missing is a list of the names of the days of the week. I'll update it when I can get my hands on that list. Have fun: http://jsfiddle.net/bGMRv/12/embedded/result/

    Edit: I've fixed that bug and added in some comments to the code. If you want to play with it it might be better to use the 'Fork' button which jsFiddle provides.
    Posted 14 months ago by Boom and Bust Subscriber! | Permalink
  • You seem to have offset the month by 1, as it's claiming today is the 22nd of Spork (which is the next month, which has only 3 days in it).
    Posted 14 months ago by Toksyuryel Subscriber! | Permalink
  • @Boom and Bust: You are fantastic. If this were reddit, I would upvote you, even from my alt accounts too. Thank you so much!

    @Toksyuryel: I will keep that in mind :)

    Edit: I tried doing some calculations in regards to the day of the week. My mathematician fiancé is in the hospital so I didn't want to trouble him with something like this, but here's my parsing of it: Every year has 308 days, but Recurse isn't counted when you consider the named days of the week. Effectively that gives us 307 named-days-of-the-week per year. Since there are 8 days per week, we have to calculate 307 mod 8, which is 3. This means that Year 1 ended on Weddingday*, Year 2 ended on Standday*, and so forth; we need to only shift the value of the day of the week (starting with 0 for Hairday and ending with 7 for Fabday) by 3 each year. I don't know how that translates into programming, though, or how we would use that to calculate the day of the week for any given date when Recurse is accounted for in the given date calculations.

    *That's assuming that my calculations are right! Correct me if I'm wrong.

    Edit 2: Ha, on rereading that, it sounds like you have that part down, and when I looked at the coding, it was obvious where that part fell. Still, a good exercise in modular arithmetic! The names of the days of the week, in order, are Hairday, Moonday, Twoday, Weddingday, Theday, Fryday, Standday, and Fabday.

    Edit 3: (Man, I am thinking way too much about this) When we calculate the information for a desired date, we also have to take into account the time zones! Those will change the UNIX TimeStamps for the formula. When people enter their desired dates in your form, I think it assumes GMT, as Glitch's formula does.
    Posted 14 months ago by Stars Subscriber! | Permalink
  • So awesome. What time zone is it operating from? GMT?
    Posted 14 months ago by Lord Bacon-o Subscriber! | Permalink
  • @Lord Bacon-o: Looks like it would have to be so far :)
    Posted 14 months ago by Stars Subscriber! | Permalink
  • @Toksyuryel: Fixed that, thanks!
    Posted 14 months ago by Boom and Bust Subscriber! | Permalink
  • @Boom and Bust: Filled in the names of the days of the week for you: http://jsfiddle.net/RsCvk/2/embedded/result/
    Posted 14 months ago by Stars Subscriber! | Permalink
  • Just everyone knows, my birthday is on Twoday the 20th of Bruise, Year 21.

    Love this!
    Posted 14 months ago by Lord Bacon-o Subscriber! | Permalink
  • Man, this is awesome, bookmark now!
    Posted 14 months ago by Muncey Mango Subscriber! | Permalink
  • My birthday is 38th Fever, Yr 14
    Posted 14 months ago by WindBorn Subscriber! | Permalink
  • @Lord Bacon-o: Ha! Technically, I was born Hairday the 17th of Junuary, Year -149; my next birthday will be Theday the 48th of Bruise, Year 15. Seeing my actual birthday like that makes me feel old. Year -149? Yikes!
    Posted 14 months ago by Stars Subscriber! | Permalink
  • It's amazing how fast the years go by…

    I came in on the tail-end of Alpha, but my Glitch's birthday (according to that awesome script) is, most likely (given my understanding of corresponding timezones to GMT): 1:00AM, on Moonday the 24th of Fever, Year 12.
    Posted 14 months ago by Tamashii Subscriber! | Permalink
  • Brilliant tool! Is there a way to convert from Glitch time/day to real time/day?
    Posted 14 months ago by Hburger Subscriber! | Permalink
  • I've just put up a date converter to convert from Local date/time -> Glitch date/time and also from Glitch date/time -> local date/time. 

    http://startlingfecundity.com/calendar
    Posted 14 months ago by dopiaza Subscriber! | Permalink
  • ooh, fancy pants!
    Posted 14 months ago by shhexy corin Subscriber! | Permalink
  • nice new site dopiaza.  Thanks for putting all your scripts in one easy location.
    Posted 14 months ago by WindBorn Subscriber! | Permalink
  • Yaaay, thanks dopiaza :D
    Posted 14 months ago by Hburger Subscriber! | Permalink
  • That's an awesome app, dopiaza :)
    Posted 14 months ago by Varaeth Subscriber! | Permalink
  • That is super awesome, dopiaza!
    Posted 14 months ago by TomC Subscriber! | Permalink
  • Oops. Just fixed a bug that was preventing some users from signing in. Sorry about  that.
    Posted 14 months ago by dopiaza Subscriber! | Permalink
  • Are the times on the date calculator EST, by the way? :)
    Posted 14 months ago by Hburger Subscriber! | Permalink
  • They *should* be in your local time zone...
    Posted 14 months ago by dopiaza Subscriber! | Permalink
  • dopiaza, that is a lovely, lovely thing you have made.

    B&B, your api has also helped a lot.
    Posted 13 months ago by Mal'akh Subscriber! | Permalink
  • 8th December 2011, 01:00 to 0:5:00 GMT

    The Lemmings will be celebrating Lemadan.

    — Mal'akhPrimate of LemPrimus Inter Pares of the Orthodox Church of the Giants of UrHubby of ArannaShriner of Mullangi Meda
    Posted 13 months ago by Mal'akh Subscriber! | Permalink