Case closed?


I dunno, I googled a bit of BASIC and vague memories of programming (mainly PHP) to throw this together. ^^'
Edit : you can also see it as a third month of "no news". Yeah, we'll go with that.
 
Calculating the "exact duration" of 2 months is very hard to impossible, as months do not have the same amount of seconds. For example: 31 dec + 2 months... is 31 feb. Also here and there extra seconds are added, thus you get times like: 23:59:62 (62 seconds, when 3 additional seconds are added). You can do compromises, like using days in the range 1-28 and only change the month.

Some more languages:

# JAVA
Code:
org.joda.time.Seconds.secondBetween(now, intwo)

# PHP
PHP:
use Carbon\Carbon;

$now = Carbon::now();
$intwo = $now->copy()->addMonths(2);
$seconds = $now->diffInSeconds($intwo);

# PERL
Code:
use Time::Piece;
use Time::Seconds;

my $now = localtime;
my $intwo = $now + 2 * ONE_MONTH;
my $seconds = ($intwo - $now)->seconds;
 
Last edited:
No matter how disappointed some people might feel. I have never seen ED as happy as when playing with those shoulder buttons. Sorry about the lack of colours in the screen grab, when I resized it I forgot I was still working in 256 colour non dithered mode for my game. Doh! (_8(|) :)


HappyED.png
 
Last edited:
No matter how disappointed some people might feel. I have never seen ED as happy as when playing with those shoulder buttons. Sorry about the lack of colours in the screen grab, when I resized it I forgot I was still working in 256 colour non dithered mode for my game. Doh! (_8(|) :)
The low colors - and lower resolution - augment this. Kind of a subtle Max Headroom effect.

But, yeah, that is one seriously @HappyDragon.

Just think how happy he will be when those buttons actually do something on the screen.
 
The low colors - and lower resolution - augment this. Kind of a subtle Max Headroom effect.

But, yeah, that is one seriously @HappyDragon.

Just think how happy he will be when those buttons actually do something on the screen.

The Happy Dragon. Sounds like a nice Chinese restaurant. Now all I need to do is sell enough games to be able to afford a Pyra then I can be as happy as ED will be :)
 
The smallest, but runnable and accurate two months program I could come up with :D

Code:
public class TwoMonths implements Runnable {
    public static void main(String[] args) {new TwoMonths().run();}
    public void run() {
        java.util.Calendar c = java.util.Calendar.getInstance();
        c.add(java.util.Calendar.MONTH, 2);
        java.util.concurrent.Executors.newSingleThreadScheduledExecutor().schedule(this, c.getTimeInMillis()- java.lang.System.currentTimeMillis(), java.util.concurrent.TimeUnit.MILLISECONDS);
        System.out.println("Two Months!™");
    }
}
 
A quick python 3 one:
Code:
import datetime, time
print("Make the pyra!")
while True:
  a=datetime.datetime.now()
  b=datetime.datetime(a.year, a.month+2, a.day, a.hour, a.minute, a.second, a.microsecond)
  time.sleep((b-a).total_seconds())
  print("Just two more months to go!")

pass

Somewhat shorter, and if you ask me, simpler to comprehend than Java, but then this is a simple case. That 'pass' at the end is unnecessary, just makes it slightly easier to copy and paste I think (otherwise you have to be sure to include the blank line, if you're running this interactively).

Edit: You need python 3 for this, otherwise you need to 'from __future__ import print_function' at the head I think (or eliminate the brackets round the arguments to the print function calls and replace them with a space separating 'print' from the string to print, if you've only got python 2 handy.
 
Last edited:


Just the two nubs
Building cases in Greece
Just the two nubs
Left and Right

I like the Pyra Pyra
I like the Pyra Pyra
I like the Pyra Pyra
You like the Pyra ... PYRA

Tout le monde (dans la communauté) est rassemblé autour du site.
En attente de nouvelles pyrennes qui viennent vite.
Je rafraîchis le navigateur de plus une fois.
Je ne suis qu'un hacker de la tribu de Pyra.


Er war ein hacker
und er lebte im darm stadt
Es war in dragon web shop
wo er alles tat
Er hatte schulden
gennant preorders
Doch ihn liebten alle nubs (und shoulderbuttons)
und jede rief come on rock me Evil Dragon.


Dos meses
llevo refrescando el website dos meses
este website es un laberinto
cuando hay noticias yo doy un grito.


In my hand I want to hold her
WAIT TWO MORE MONTHS
And create a projects folder
WAIT TWO MORE MONTHS
Compile while I take a shower
WAIT TWO MORE MONTHS
recharge and do it once over
WAIT TWO MORE MONTHS
play with four shoulder buttons
WAIT TWO MORE MONTHS
 
Last edited:
Back
Top