Stencyl 3.4.0 is now out. Get it now!

Date Extension

GwefTech

  • Posts: 295
Don't think it will work as number either, they have to be a date.   In PHP/jQuery/JavaScript (probably any language) you can set a value to a date attribute.    By setting it to a number you would get a totally different output.

I have done an App that utilises this, but using Xcode with the PhoneGap/Cordova plugin,  but I would have loved to have used Stencyl doing it. 


Dom818

  • *
  • Posts: 1296
What do you want to do with the date? I can probably add some more functions to the extension to do what you want.

GwefTech

  • Posts: 295
I want to be able to find out how much days there is between the current date and a pre-defined date

Basically for a Christmas countdown app

Dom818

  • *
  • Posts: 1296
I want to be able to find out how much days there is between the current date and a pre-defined date

Basically for a Christmas countdown app

Hmm, I think I may be be able to add something like that. I'll look into it today.

mat0pad

  • Posts: 364
Is this OpenFL compatible? 
   


                              

Dom818

  • *
  • Posts: 1296
Is this OpenFL compatible?

Yep, I think it is. It used direct Haxe so it shouldn't have been affected. If it is, let me know and I will fix it.

semiplay

  • Posts: 14
Was there a resolution to the idea of a countdown to a specific date?  I also have need of that --- have an app that I'd like to convert to Stencyl that uses that type of logic.

Thanks!

TwistedIdentity

  • *
  • Posts: 242
Thanks!! I need this for my tamagotchi style app.
My Critter Android http://bit.ly/1gJyUs4
TI's FB Page: http://on.fb.me/1ijla4Y
Deadly Space Boss Arena 2: http://goo.gl/KIuowG

Follow me on Twitter: @jettas88

Dom818

  • *
  • Posts: 1296
Was there a resolution to the idea of a countdown to a specific date?  I also have need of that --- have an app that I'd like to convert to Stencyl that uses that type of logic.

Thanks!

Something like a block that determines the time between two dates?

GwefTech

  • Posts: 295
Something like a block that determines the time between two dates?

Exactly - a simple example would be like a Christmas Countdown App.   'There's XYZ days | XYZ Hours etc..... left until Xmas' 

Aasimar

  • *
  • Posts: 605
Hi Dom,

What about the progress to compare the time between two dates ?
I'm working on something that could use that type of bloc.

If you're on it, let me know :)

Cheers,

Dom818

  • *
  • Posts: 1296
Hi Dom,

What about the progress to compare the time between two dates ?
I'm working on something that could use that type of bloc.

If you're on it, let me know :)

Cheers,

I'll get on it this week, I was finishing up finals for school so that's why I haven't been able to work on it. I should be able to get it working by Friday.

Aasimar

  • *
  • Posts: 605
Hi Dom,
I'm at home now, sorry for the brief email, some blocks useful for me, that you can add in your extension if you want to for the others guys !

I also have a "born" block, usefull for calculate an age of a virtual pet, it's Date.now().getTime() - Born (Born = Timestamp at X date)


Cheers,

Dom818

  • *
  • Posts: 1296
Hi Dom,
I'm at home now, sorry for the brief email, some blocks useful for me, that you can add in your extension if you want to for the others guys !

I also have a "born" block, useful for calculate an age of a virtual pet, it's Date.now().getTime() - Born (Born = Timestamp at X date)

Cheers,

Here's what I'm thinking of adding:
-get timestamp
-get (hours, minutes, days, etc ) using timestamp ()
-convert (number) to (hours, minutes, days, etc)

Using this setup, you could use the saved timestamps, subtract them, and use the convert block to find how much is in between. Sound good?

Aasimar

  • *
  • Posts: 605
Yep, sound good ! Thanks for the integration, it's cool for us !