[FUN] Get ready to celebrate

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[FUN] Get ready to celebrate

Sven Van Caekenberghe-2
https://en.wikipedia.org/wiki/Unix_time

"Right now"

DateAndTime now asUnixTime.

"Coming up"

DateAndTime fromUnixTime: 1500000000.

"How long till then ?"

(DateAndTime fromUnixTime: 1500000000) - DateAndTime now.

;-)

Sven

Reply | Threaded
Open this post in threaded view
|

Re: [FUN] Get ready to celebrate

Tudor Girba-2
Geeky :)

Doru


> On Jul 13, 2017, at 12:03 PM, Sven Van Caekenberghe <[hidden email]> wrote:
>
> https://en.wikipedia.org/wiki/Unix_time
>
> "Right now"
>
> DateAndTime now asUnixTime.
>
> "Coming up"
>
> DateAndTime fromUnixTime: 1500000000.
>
> "How long till then ?"
>
> (DateAndTime fromUnixTime: 1500000000) - DateAndTime now.
>
> ;-)
>
> Sven
>

--
www.tudorgirba.com
www.feenk.com

"We are all great at making mistakes."









Reply | Threaded
Open this post in threaded view
|

Re: [FUN] Get ready to celebrate

HenrikNergaard5
In reply to this post by Sven Van Caekenberghe-2
---------------------------
| font time morph window |

font := LogicalFont familyName: 'Source Sans Pro' pointSize: 55.
time := [ ((DateAndTime fromUnixTime: 1500000000) - DateAndTime now) asString ].

morph := StringMorph
        contents: time value
        font: font.

window := morph openInWindow.

window center: (window world clearArea center).

window world
        startStepping: morph
        at: Time millisecondClockValue
        selector: #in:
        arguments: {[ :sm | sm contents: time value ]}
        stepTime: 125
---------------------------

Best regards,
Henrik